-
Notifications
You must be signed in to change notification settings - Fork 80
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
base: main
Are you sure you want to change the base?
Maple - Detroit #75
Conversation
…react-tic-tac-toe into digital-starter
if (turn % 2 !== 0) { | ||
return PLAYER_1; | ||
} else { | ||
return PLAYER_2; |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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"
Good Tiana! I only had a few comments to add :) |
No description provided.