Skip to content

Conversation

@ErikaChikere
Copy link

No description provided.

@ErikaChikere ErikaChikere changed the title Waves 1-3 are passing successfully. Paper: Erika Chikere Jun 25, 2021
Copy link

@CheezItMan CheezItMan left a comment

Choose a reason for hiding this comment

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

This was really solid work Erika. The game works and works well. Nice work.

Comment on lines +36 to +47
for (let i=0; i<3; i+=1){
if(squares[i][0].value === squares[i][1].value &&
squares[i][2].value === squares[i][1].value &&
squares[i][0].value !== '') {
return squares[i][0].value;

} else if (squares[0][i].value === squares[1][i].value &&
squares[2][i].value === squares[1][i].value &&
squares[0][i].value !== '') {
return squares[0][i].value;
}
}

Choose a reason for hiding this comment

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

Nice use of the loops

// all three squares have the same value.

const updateBoard = (id) => {
if (winner !== null) return;

Choose a reason for hiding this comment

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

Nice way to stop the game if there's a winner.

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