Create a Tic Tac Toe game following the rules.
- a game has nine fields in a 3x3 grid
- there are two players in the game (X and O)
- players take turns taking fields until the game is over
- a player can take a field if not already taken
- a game is over when:
a. a player has taken all fields in a row
b. a player has taken all fields in a column
c. a player has taken all fields in a diagonal
d. all fields have been taken (draw game)
Winning game examples:
5. a. All fields in a row
X X X
O O _
O X O
5. b. All fields in a column
O X X
O O X
O X O
5. c. All fields in a diagonal
X X O
O X X
O O X
5. d. All fields have been taken (no winners)
O X O
O X O
X O X
- Tic-tac-toe on wikipedia: https://en.wikipedia.org/wiki/Tic-tac-toe
Import via intellij:
- Click on open or import
- go to the project folder
- click on "open"
- check "use auto import" flag in the just opened window