HoangHai-portliofio-projects / Projects / 5.Tictactoe_java
README.md

TicTacToe game

Language: Java

Written by Le The Hoang Hai


Check out: my github

How you can start

  • Clone this Repository
  • Go to TicTacToeApplication which has the main method >> run

Game flow:

  1. Player pick cell by 1-9
  2. The computer plays by picking randomly among left-over cells
  3. Check if there is winner or board is full -> game ends.

Demo view

Game starts

Welcome to TicTacToe
Enter your Marker: 
X
Enter Ai marker: 
O
| 1| 2| 3
------------
| 4| 5| 6
------------
| 7| 8| 9

|-||-||-|
------------
|-||-||-|
------------
|-||-||-|

End game

You picked 4
|O||A||A|
------------
|O||O||O|
------------
|-||-||A|
We have a winner! The winner is O's

Want another game??  Y or N