Nim game in rust
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Astequ 37f1fb976d Update '' 2 years ago
src update 2 years ago
.gitignore firsto 4 years ago
Cargo.toml firsto 4 years ago Update '' 2 years ago
feo1.iml firsto 4 years ago


Nim game in rust


Each turn, a player must move one piece one or two places right or down. The loser is the last one putting a piece on the bottom-right corner.


The game features three different difficulty levels :

  • 1 : the computer plays 10% perfect, 90% random
  • 2 : the computer plays 50% perfect, 50% random
  • 3 : the computer plays 90% perfect, 10% random

Note that if the computer is unable to perform a perfect move, it will play a random move instead.

The board can take every size between 3*3 and 30*30, including non-square ones.

The maximum amount of pieces on a board is the number of rows of the board.