/tic-tac-toe

Primary LanguageJavaScript

Tic Tac Toe

Multiple board size options (up to 20x20)

How to play the game

Select the board size you wish to play on from the dropdown menu and then click "Start the Game" button

Classic Tic Tac Toe game rules apply.

  • There are two players, X and O.
  • The game always starts with player X and then each player takes turn.
  • Game is over if there is a winner. If there is no winner, game is a tie.
  • The player who succeeds in placing all of their marks in a diagonal, horizontal, or vertical row is the winner.
  • If you decide to start over, press "Reset" button and select your new board size.

Developers

Clone to the local machine

git clone https://github.com/yusufalp/tic-tac-toe.git

To run a demo of the game

After cloning the repo, cd to directory and run npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

To embed the Board onto your own

Copy the following components into your own React app in the same directory

  • Board
  • Grid
  • Dropdown
  • Button

Important Note: You are expected to have a function that calculates the winner. If not, you can always use the AnnounceWinner component.

Technologies Used

  • React v17.0.1
  • Node v14.15.1

Bug reports

If you discover any bugs, feel free to create an issue on GitHub. Please add as much information as possible to help us in fixing the potential bug. We also encourage you to help even more by forking and sending us a pull request.

https://github.com/yusufalp/tic-tac-toe/issues