A basic two-player tic-tac-toe game.
This program requires Java to compile and run.
- Download this repository and unzip the .zip file in your desired location.
- Using the command line, navigate to \Tic-Tac-Toe-master\src\tictactoe.
- Compile the program using the command
javac Main.java
.
Once the program has been compiled, it can be run from the command line by navigating to \Tic-Tac-Toe-master\src and using the command java tictactoe.Main
.
The game starts with an empty board and on X's turn. The user will be prompted to enter coordinates. The game board's coordinates are as such:
(1, 3) (2, 3) (3, 3)
(1, 2) (2, 2) (3, 2)
(1, 1) (2, 1) (3, 1)
Coordinates should be entered as two integers with a space between them, e.g. 1 3
.
The game will end when either X or O has occupied three spaces in a row or when all of the board's spaces are filled.
Author: Kate Jordan - sinnenicht
This program is based on the Tic-Tac-Toe project on Jet Brains Academy.
This project is licensed under the MIT License. See the LICENSE for details.