Skip to content

sinnenicht/Tic-Tac-Toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic-Tac-Toe

A basic two-player tic-tac-toe game.

Prerequisites

This program requires Java to compile and run.

Installation

  1. Download this repository and unzip the .zip file in your desired location.
  2. Using the command line, navigate to \Tic-Tac-Toe-master\src\tictactoe.
  3. Compile the program using the command javac Main.java.

Usage

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.

Credits

Author: Kate Jordan - sinnenicht

This program is based on the Tic-Tac-Toe project on Jet Brains Academy.

License

This project is licensed under the MIT License. See the LICENSE for details.