Skip to content

finished waves 1-3: rendered Board and Squares, added Click Funtional…#69

Open
ktiktok96 wants to merge 2 commits into
Ada-C15:masterfrom
ktiktok96:master
Open

finished waves 1-3: rendered Board and Squares, added Click Funtional…#69
ktiktok96 wants to merge 2 commits into
Ada-C15:masterfrom
ktiktok96:master

Conversation

@ktiktok96
Copy link
Copy Markdown

…ity, Checked For winner.Also finished enhancements and allowed reset functionality, resets the game's state and clears all the game squares. Next, I plan to work on deploying on the web.

ktiktok96 added 2 commits July 5, 2021 16:31
…ity, Chcked For winner.Also finished enhancements and allowed reset functionality, resets the game's state and clears all the game squares. Next, I plan to work on deploying on the web
Copy link
Copy Markdown

@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.

Nice work Karla, this looks good. You're not detecting ties, but otherwise this is great work. You hit the learning goals here. Well done.

Comment thread src/App.js
Comment on lines +52 to +53
const coordinates = cellMap[event.target.id]
if(squares[coordinates.y][coordinates.x].value!==''||winner!==''){
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Interesting solution!

Comment thread src/App.js
Comment on lines +74 to +75
for(let x= 1; x<3; x++){
if(squares[y][x].value!==player){
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Indentation

Suggested change
for(let x= 1; x<3; x++){
if(squares[y][x].value!==player){
for(let x= 1; x<3; x++){
if(squares[y][x].value!==player){

Comment thread src/App.js
<h1>React Tic Tac Toe</h1>
<h2>The winner is ... -- Fill in for wave 3 </h2>
<button>Reset Game</button>
{winner!==''&&<h2> Winner is {winner} </h2>}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice tricky JS syntax

Comment thread src/App.js



const checkForWinner = () => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Just a note that this function doesn't determine ties.

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