mirror of https://github.com/01-edu/public.git
refactor(tic_tac_toe): all results are now lowercase
This commit is contained in:
parent
13b4b0fbf7
commit
ad42d04a89
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
You must create some functions for a tic-tac-toe checker.
|
You must create some functions for a tic-tac-toe checker.
|
||||||
|
|
||||||
Create a function named `tic_tac_toe`, which receives a tic-tac-toe table. It should return the appropriate string: `"player O won"`, `"player X won"` or `"Tie"`.
|
Create a function named `tic_tac_toe`, which receives a tic-tac-toe table. It should return the appropriate string: `"player O won"`, `"player X won"` or `"tie"`.
|
||||||
|
|
||||||
|
|
||||||
Also create the following functions, which each accept a player and a table. These functions should return `true` if the player has completed one of the diagonals, rows or columns:
|
Also create the following functions, which each accept a player and a table. These functions should return `true` if the player has completed one of the diagonals, rows or columns:
|
||||||
|
@ -64,7 +64,7 @@ And its output
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ cargo run
|
$ cargo run
|
||||||
"Tie"
|
"tie"
|
||||||
"player O won"
|
"player O won"
|
||||||
"player X won"
|
"player X won"
|
||||||
$
|
$
|
||||||
|
|
Loading…
Reference in New Issue