Skip to content

Roobyx/nim-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

nim-py

Nim game written in Python

Rules of the game:

  • There are a few piles of items
  • 2 players take turns to take items from the piles
  • During your turn, you can take as many items from a single pile as you want, but you have to take at least one and you cannot take from any other pile after that
  • The player who takes the last item is the winner

Implementation

  • The code is written in Python 3
  • Supports "Player vs Player" and "Player vs AI" modes
  • Currently in the vs AI mode the human player starts the game (which makes him in absolute disadvantage and should result in a loss 100% of the games)
  • The AI has simple solutions to unbalanced state of the game (such as the second turn of the game)

TODO:

  • Allow 2 player mode (hot spot) Done!
  • Add GUI
  • Add difficulty levels Done!

-- Written by Marian Radev

Releases

No releases published

Packages

No packages published

Languages