A tik tak toe game bot.
A board works as follows -
- A Bot(either X or O) is selected randomly to go first.
- Bots mark board until a final condition is met.
- The last state of the board is displayed, along with winner and Bot that went first.
curl https://sh.rustup.rs -sSf | sh
cd into the repository, and execute
cargo run
Note the following
"."
is symbolic of "X"/"O"/"."
"@"
must be "X"/"O"
Row win states
@ @ @ . . . . . .
. . . @ @ @ . . .
. . . . . . @ @ @
Column win states
@ . . . @ . . . @
@ . . . @ . . . @
@ . . . @ . . . @
Diagonal win states
@ . . . . @
. @ . . @ .
. . @ @ . .