Skip to content

ApoorvaSunkad/TicTacToe-Game-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TicTacToe-Game-

Hi, I have uploaded the codes of simple game developed using HTML, CSS, JavaScript.

//Game We have 9 boxes in a matrix shape. and we have 2 players

  1. We have 2 symbols known as "X" and "O"
  2. Any player can choose any symbol when he/she starts playing the game.
  3. Suppose player 1 chooses "X" and puts in a box and player 2 chooses "O" and puts in another box and so on.
  4. Whenever any horizontal/ vertical or diagonal row/column gets filled by same symbol by any player than that player wins the game.
  5. Hence they are some winning patterns to actually build this game.

Imagine a matrix

0 1 2 3 4 5 6 7 8

winning patterns

Horizontal Patterns 0 1 2 (all 3 can X X X or O O O) 3 4 5 (all 3 can X X X or O O O) 6 7 8 (all 3 can X X X or O O O)

vertical Patterns 0 3 6 (all 3 can X X X or O O O) 1 4 7 (all 3 can X X X or O O O) 2 5 8 (all 3 can X X X or O O O)

Diagonal Patterns 0 4 8 (all 3 can X X X or O O O) 2 4 6 (all 3 can X X X or O O O)

About

Hi, I have the codes of simple game developed using HTML, CSS, JavaScript.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors