Skip to content

rherrmannr/RusTicTacToe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TicToc

RusTicTacToe

CLI and GUI based TicTacToe implemented in Rust. Using SDL2 for GUI https://github.com/Rust-SDL2/rust-sdl2.

Build, Run and Test

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

Playing the Game

With GUI

Alt Text

With CLI

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.

Fonts

Font source https://www.dafont.com/de/

About

Command line based TicTacToe implemented in Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages