- Notifications
You must be signed in to change notification settings - Fork0
A simple game of Nim written in Python
License
NotificationsYou must be signed in to change notification settings
Tosox/Simple-Nim
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A simple game of Nim written in Python
Important Note: The AI isn't implemented yet and is instead using the logic of a random player
# Example> python ./simple_nim.py -p1 Human -p2 Computer --rand 1
Alternatively, simply execute'play.bat'
Arguments | Description | Accepted input | Notes |
---|---|---|---|
-p1 | Player type for player 1 | Human, Computer, Random, AI | |
-p2 | Player type for player 2 | Human, Computer, Random, AI | |
--rand | Starting player | 0 (Random), 1 (Player 1), 2 (Player 2) | Optional - Defaults to 0 |
Two players will each take one, two or three coins at a time from a heap containing 21 coins.The player who has no coins to retrieve from the heap loses.
About
A simple game of Nim written in Python