rbiodies / Tic-Tac-Toe_with_AI

:x: :o: :robot: Tic-tac-toe game with artificial intelligence

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tic-Tac-Toe_with_AI

Objectives of this project

  1. Prints an empty grid at the beginning of the game.
  2. Creates a game loop where the program asks the user to enter the cell coordinates, analyzes the move for correctness and shows a grid with the changes if everything is okay.
  3. The program asks the AI to enter the cell coordinates, analyzes the move for correctness and shows a grid with the changes if everything is okay.
  4. Ends the game when someone wins or there is a draw.

Example

---------
|       |
|       |
|       |
---------
Enter the coordinates: 0 0
Coordinates should be from 1 to 3!
Enter the coordinates: 1 one
You should enter numbers!
Enter the coordinates: 1 1
---------
| X     |
|       |
|       |
---------
Making move level "easy"
---------
| X O   |
|       |
|       |
---------
Enter the coordinates: 2 2
---------
| X O   |
|   X   |
|       |
---------
Making move level "easy"
---------
| X O O |
|   X   |
|       |
---------
Enter the coordinates: 3 3
---------
| X O O |
|   X   |
|     X |
---------
X wins

About

:x: :o: :robot: Tic-tac-toe game with artificial intelligence


Languages

Language:Java 100.0%