finished waves 1-3: rendered Board and Squares, added Click Funtional…#69
Open
ktiktok96 wants to merge 2 commits into
Open
finished waves 1-3: rendered Board and Squares, added Click Funtional…#69ktiktok96 wants to merge 2 commits into
ktiktok96 wants to merge 2 commits into
Conversation
…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
CheezItMan
reviewed
Jul 13, 2021
CheezItMan
left a comment
There was a problem hiding this comment.
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 on lines
+52
to
+53
| const coordinates = cellMap[event.target.id] | ||
| if(squares[coordinates.y][coordinates.x].value!==''||winner!==''){ |
Comment on lines
+74
to
+75
| for(let x= 1; x<3; x++){ | ||
| if(squares[y][x].value!==player){ |
There was a problem hiding this comment.
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){ |
| <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>} |
|
|
||
|
|
||
|
|
||
| const checkForWinner = () => { |
There was a problem hiding this comment.
Just a note that this function doesn't determine ties.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…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.