Skip to content

Conversation

@GormanGit
Copy link
Owner

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.

Overall #solidwork, but at least translate facebook's tutorial into what we've learned. And maybe make a reset function!

Edit: Copy-pasting a tutorial does not constitute your work.

}
renderSquare(i) {
return (
<Square
Copy link

Choose a reason for hiding this comment

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

Very nice use of a render function, but remember to code DRY (don't repeat yourself).
I'd recommend instead making this a renderSquares() function that maps through this.state.squares. This way you have access to the index of each square which you can pass into this.state.squares[index] as well as this.handleClick(index).

Copy link

Choose a reason for hiding this comment

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

Also you've got some funky indentation here. coughCOPYPASTINGFROMTHEREACTDOCScough

}

handleClick(i){

Copy link

Choose a reason for hiding this comment

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

Unnecessary whitespace

<div data-cell="0"></div>
<div data-cell="1"></div>
<div data-cell="2"></div>
{/*<div data-cell="0"></div>*/}
Copy link

Choose a reason for hiding this comment

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

Get rid of all these

{/*<div data-cell="8"></div>*/}
{this.renderSquare(8)}
</div>

Copy link

Choose a reason for hiding this comment

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

Unnecessary whitespace


ReactDOM.render(<TicTacToe />, document.getElementById('tic-tac-toe'));

function calculateWin(squares){
Copy link

Choose a reason for hiding this comment

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

Is that the word function?

[0, 4, 8],
[6, 4, 2],
];
for(let i = 0; i <lines.length; i ++) {
Copy link

Choose a reason for hiding this comment

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

Is this a for loop? Why?

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.

4 participants