This is a simple Tic Tac Toe game built in Rust. There are four options to play the game:
- Human vs Human
- Human vs Computer
- Computer vs Human
- Computer vs Computer
The computer player uses the minimax algorithm to select the best space.
- Install Rust by following these instructions, followed by the instructions in your terminal.
- In your home folder, clone the repository
$ git clone [email protected]:rust-tic-tac-toe/tic-tac-toe.git
- In terminal, CD into the repository
$cd tic-tac-toe
- Build the game by running
$ cargo build
- Test the game by running
$ cargo test
- Play the game by running
$ cargo run
- Per the Test Organization chapter of The Rust Programming Language; unit tests are included in the source file they are testing and integration tests are separate in the tests folder.
- There are no unit tests for
app_runner.rs
andhuman.rs
as this code is tested by the integration tests. The functions called in these two files are tested in their relative source files.