Skip to content

progress before tictactoe video#17

Open
deytonk wants to merge 4 commits intogh-pagesfrom
class13-towersOfHanoi
Open

progress before tictactoe video#17
deytonk wants to merge 4 commits intogh-pagesfrom
class13-towersOfHanoi

Conversation

@deytonk
Copy link
Owner

@deytonk deytonk commented Nov 22, 2017

Checkpoint Rubric

This is the rubric that your instructor will use to grade your checkpoints. Please do not edit.

Checkpoint 1

  • All tests passed: 40 points
  • Proper use of documentation (commenting on code): 15 points
  • Properly indented code: 15 points
  • Demonstrated effective use of JavaScript: 30 points

Checkpoint 2

  • The application works as it should: 40 points
  • Proper use of documentation (commenting on code): 15 points
  • Properly indented code: 15 points
  • Demonstrated effective use of JavaScript and the DOM API: 30 points

Checkpoint 3

  • Use of React: 25 points
  • Accesses an API: 25 points
  • Proper use of documentation (commenting on code): 25 points
  • The application functions as it should: 25 points

Copy link

@stu-k stu-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're not rendering anything.


renderStacks() {
//for every key, render numbers in array value
return Object.keys(this.state.stacks).map((stack) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This .map isn't returning anything.

}
}

handleStackClick(startStack, endStack) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary value in state, it is never used or changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants