Skip to content

Jeswin-8802/tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic-Tac-Toe

The classic game of Tic Tac Toe written in JavaScript

New to Tic Tac Toe?

Tic-Tac-Toe is a two-player game in which the players fill up nine empty rectangles in a table with either an X or an O when it is their turn. Once someone succeeds in lining up 3 consecutive signs of the same kind vertically, horizontally, or diagonally, that player wins.

How to Play

Click anywhere on the 3 x 3 grid to start playing by setting the cell in the grid to either X or O. The game ends when the conditions given above are reached.

There is a multiplayer option as well as an option to play against the computer (I bet you will find it very difficult to beat it 🙂).

Note: You make the first move as X against the computer (when played in Player vs Computer mode).

Screenshot 2022-03-19 193310

I tried to make the game a little different by adding a 4 x 4 version. The only difference being you need to get 4 consecutive Xs or Os horizontally, vertically, or diagonally.

you can find the app here 👉 https://jeswin-8802.github.io/tic-tac-toe/

Have Fun! 👍

References