CLI and GUI based TicTacToe implemented in Rust. Using SDL2 for GUI https://github.com/Rust-SDL2/rust-sdl2.
In order to build the project run:
cargo build
Start the game with CLI:
cargo run
Start the game with GUI:
cargo run -- gui
Tests can be executed with:
cargo test
Payer X
starts the game. The command line expects numbers between 0
and 2
for selecting the row and column. If the field is already in use, the user can repeat the selection, until the sign is set.
It's X's turn.
Type in the row.
1
Type in the column.
1
---
-X-
---
It's O's turn.
Type in the row.
0
Type in the column.
0
O--
-X-
---
After one player has one, the game will be restarted automatically.
OXO
-X-
-X-
X has won!
---
---
---
It's X's turn.
Type in the row.
Font source https://www.dafont.com/de/