Skip to content

Jakub-coding99/Tic-Tac-Toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Tic-Tac-Toe

Tic Tac Toe against AI

Functions

  • Single-player game
  • AI can block the user's move and search for winning combinations
  • Detects draws, winners, and offers the option to restart the game
  • Play by entering a number from 1 to 9

AI

The AI uses a simple strategy:

  • If it can win, it plays the winning move
  • If the user can win, it blocks the user's winning move
  • If possible, it starts by taking the center of the board
  • If the center is taken, it tries to take a corner
  • Otherwise, it chooses a random available field

Game preview

1

2

3

Launching a game

About

Tic Tac Toe against AI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages