-
Notifications
You must be signed in to change notification settings - Fork 0
CheckPoint1 #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: gh-pages
Are you sure you want to change the base?
CheckPoint1 #6
Conversation
reneemeyer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good job, see comments below
| // Checking to see if one block is larger than the other for valid move | ||
| const grabLast = stacks[startStack].slice(-1) | ||
| const compareWhereGoing = stacks[endStack].slice(-1) | ||
| if(grabLast < compareWhereGoing || compareWhereGoing === undefined){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
simplify and just return the evaluation
return !compareWhereGoing || grabLast < compareWhereGoing| function checkForWin() { | ||
| // Your code here | ||
| // C in quotes to access the array and 4 is the lenght of the pieces needed to Win | ||
| return (stacks['c'].length == 4); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parentheses are unnecessary
|
|
||
| // Function To Reset Game | ||
| const resetGame=()=>{ | ||
| return stacks; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't reset anything
Checkpoint Rubric
This is the rubric that your instructor will use to grade your checkpoints. Please do not edit.
Checkpoint 1
Checkpoint 2
Checkpoint 3