https://github.com/zsarge/tic-tac-toe
tic-tac-toe in rust
https://github.com/zsarge/tic-tac-toe
game rust tic-tac-toe
Last synced: 18 days ago
JSON representation
tic-tac-toe in rust
- Host: GitHub
- URL: https://github.com/zsarge/tic-tac-toe
- Owner: zsarge
- License: mit
- Created: 2021-07-18T00:10:42.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-07-25T18:26:48.000Z (almost 5 years ago)
- Last Synced: 2025-01-27T14:49:31.502Z (over 1 year ago)
- Topics: game, rust, tic-tac-toe
- Language: Rust
- Homepage:
- Size: 43 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tic-tac-toe
This was a project I made in an attempt to learn [Rust](https://www.rust-lang.org).
This is not a fully featured tic-tac-toe game, but it runs the basic game.
Example output:
```
1 | 2 | 3
---+---+---
4 | 5 | 6
---+---+---
7 | 8 | 9
- X's move:
5
1 | 2 | 3
---+---+---
4 | X | 6
---+---+---
7 | 8 | 9
- O's move:
0
- Please enter a number from 1 to 9.
5
- Please enter a number that has not been chosen.
2
1 | O | 3
---+---+---
4 | X | 6
---+---+---
7 | 8 | 9
- X's move:
6
1 | O | 3
---+---+---
4 | X | X
---+---+---
7 | 8 | 9
- O's move:
4
1 | O | 3
---+---+---
O | X | X
---+---+---
7 | 8 | 9
- X's move:
3
1 | O | X
---+---+---
O | X | X
---+---+---
7 | 8 | 9
- O's move:
7
1 | O | X
---+---+---
O | X | X
---+---+---
O | 8 | 9
- X's move:
9
1 | O | X
---+---+---
O | X | X
---+---+---
O | 8 | X
Game over!
```