I have made this using three functions.
- add() function -> stores the used places/cells using arrays.
- check() function -> checks that whether the place in grid is already used or not.
- win() function -> checks all the possibilities for a player to win and returns the player who wins.
3 files are there. Download these 3 files on your local machine to play with anyone sitting with you.This is a 2 Player game, can be played from single PC | Laptop.
- tictactoe.html - Double click on this file to play the game.
- game_style.css - to add glowing effects,grid,message,etc.
- game_script.css - to add onclick events,functions,to decide winner,etc.