Conversation
stu-k
left a comment
There was a problem hiding this comment.
I can see the start of some good logic and render methods, but no follow through! When developing, you should make sure your app is rendering before making changes, otherwise errors can compound and you're left with something you don't understand!
Try stripping out the isLegalMove, state.stackColorObj, and change your handleStackClick to accept only the stack clicked on, since you only click on one at a time (i recommend adding a popped or held variable to state that holds onto a disc that was picked up).
| } | ||
| render() { | ||
| return ( | ||
| <div> |
|
|
||
| renderStacks() { | ||
| //for every key, render numbers in array value | ||
| return Object.keys(this.state.stacks).map((stack) => { |
| } | ||
| } | ||
|
|
||
| handleStackClick(startStack, endStack) { |
There was a problem hiding this comment.
Here, you use methods assuming an endStack, but you never pass one in. Which doesn't really make sense, since you only click one stack at a time.
| b: [], | ||
| c: [] | ||
| }, | ||
| stackColorObj: { |
There was a problem hiding this comment.
Unnecessary value in state, it is never used or changed.
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