Skip to content

Conversation

Detroit-the-Dev
Copy link

No description provided.

Comment on lines +38 to +41
if (turn % 2 !== 0) {
return PLAYER_1;
} else {
return PLAYER_2;
Copy link

Choose a reason for hiding this comment

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

you could refactor here and use a ternary operator

}
}
let checkedWinner = checkForWinner();
console.log(checkedWinner);
Copy link

Choose a reason for hiding this comment

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

remove console log after debugging

<h1>React Tic Tac Toe</h1>
<h2>The winner is ... -- Fill in for wave 3 </h2>
<button>Reset Game</button>
<h2>Winner is {winner}</h2>
Copy link

Choose a reason for hiding this comment

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

When there isn't a winner you could display who the current player is. Like "Its Player 1's turn" or "It's X's turn"

@tgoslee
Copy link

tgoslee commented Jan 11, 2022

Good Tiana! I only had a few comments to add :)

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.

3 participants