Adding partnerChallenge.js and towers of Hanoi#5
Open
copelandhouse2 wants to merge 6 commits intogh-pagesfrom
Open
Adding partnerChallenge.js and towers of Hanoi#5copelandhouse2 wants to merge 6 commits intogh-pagesfrom
copelandhouse2 wants to merge 6 commits intogh-pagesfrom
Conversation
reneemeyer
approved these changes
Aug 1, 2017
reneemeyer
left a comment
There was a problem hiding this comment.
Craig, nice job! Love love love the code plan and your comments. MTS.
| // Tests to make sure user entries are only a, b, or c. | ||
| const validUserEntry = (myStack) => { | ||
| const validStacksArr = ['a','b','c']; | ||
| return validStacksArr.some(validStack => myStack === validStack); |
| getPrompt(); | ||
| // I wrapped towersOfHanoi function around a condition so I can "end" the game. towersOfHanoi returns TRUE if someone | ||
| // won the game. It returns FALSE if the game is still going on. | ||
| if (!towersOfHanoi(startStack, endStack)) { |
pieroapretto
reviewed
Aug 5, 2017
| } | ||
| return false; | ||
| // stacks.b.length === winCount || stacks.c.length === winCount ? (return true) : (return false); | ||
| return stacks.b.length === winCount || stacks.c.length === winCount; |
There was a problem hiding this comment.
Please remove dead code.
Nice, concise win checkForWin() statement otherwise.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Week 3a (Tue class)