Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maple - Detroit #75

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

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

};

return (
<div className="App">
<header className="App-header">
<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