Giter Site home page Giter Site logo

tiktaktoe's Introduction

Tik Tak Toe Game!

This is a simple tik-tak-toe game where each player switches off trying to match 3 squares in a row so they fit their symbol (X or O).

Roadmap of Future Improvements

  1. Add error handling to prevent a user from changing the square after it has been clicked I will add an alert that will prevent the user from changing the square as well as prevent the state from being updated if it has already been clicked. Furthermore, I will add the attribute disabled to the square to prevent the user from clicking it again.
  2. Add a reset button to clear the board and start a new game. I will add a button that will reset the state of the board to all empty squares. I will doing this by checking if a winner has been declared and if so, I will reset the state of the board to all empty squares by using useEffect. I also create a button attached to a function that will reset the state of the board to all empty squares and then call that function when the button is clicked.
  3. Add a score board to keep track of the number of wins for each player. The score board will be its own component that holds the state overtime of the number of wins for each player. I will also add a function that will update the state of the score board overtime a player wins. I will also add a function that will reset the state of the score board to 0 for each player.
  4. Add a feature to allow the user to choose their symbol (X or O). This will also be attached to a custom name that the player can use. Above the scoreboard there will be the names and symbols of each player. I will implement this by creating a form for each player when the game begins. The form will have its own state that will be updated when the user submits the form. I will also add a function that will reset the state of the form to empty strings when the reset button is clicked.

tiktaktoe's People

Contributors

masonjake avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.