-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
[Mistake]: In React Tic Tac Toe game tutorial #6966
Comments
Hypothetically if someone were to work on this, does this mean we have to change majority of the page 1st being the "What are you building?" section and anything after "Declaring a Winner" section? – since There's multiple ways approach to this; Another approach is adding a section specifically for said issue and how to rectify it. Aptly named: "Edge case: there's no winner" What do you people think? |
Hi @TanmayKumar-EngStud @henrik , |
Thanks @AkashJana18 , only the draw part for that game example was missing in the documentation which i wanted to highlight. |
Summary
In the given game tutorial, the draw condition is not covered up. So once all tiles are filled, then it shows the turn of 'O' to play. It doesn't over the game.
Page
https://react.dev/learn/tutorial-tic-tac-toe
Details
This can by quickly fixed, by adding a
count
variable in calculateWinner function.The text was updated successfully, but these errors were encountered: