Introduction:
Soulkeeper's Nim is a small text-based nim game that I made just for fun, and simply just to practice the python programming language. I've yet to get the grasp of classes, so this is merely a crude compilation of functions (for those of you who are tech savvy).
Mechanics:
A nim game is a game usually played between two players. Each player take turns in taking a number of 'units' from the 'pool' of the said 'units'. The player who takes the last unit is the winner.
In this game, the 'pool' is 20 units and each player is allowed to take either one or two units from the pool at each of their turns. Easy right?
I've done my best in trying to make the computer as smart as possible, but it is still rather easy to beat once you know what to do. As this game is pretty simple, It is also already 'solved'. I used this information to program the computer to be as smart as possible.
Uses:
I made this game to be a 'time waster' of sorts, so might as well use it as one. It isn't really that complex of a game and it runs fast enough that you can have a full game finished in 30 seconds. So yeah, time waster.
Running the program:
This game can run in windows and any other OSes that have python.
For windows, simply launch the included sk_nim.exe file.
For linux and all else, open Terminal and change the directory to the directory of sk_nim.py.
Then, enter python sk_nim.py
Other Stuff:
I also threw in a crude 6-sided dice roller just because I thought I should have it in.
Also included is the source code of the game, if for any reason, you want to see how it was done.
Just a heads-up: it's pretty messy!
Oh, if you need more info and the like, refer to the readme. Or you can open the source code (sk_nim.py) using a text editor. I've commented it sufficiently enough.
Soulkeeper's Nim is a small text-based nim game that I made just for fun, and simply just to practice the python programming language. I've yet to get the grasp of classes, so this is merely a crude compilation of functions (for those of you who are tech savvy).
Mechanics:
A nim game is a game usually played between two players. Each player take turns in taking a number of 'units' from the 'pool' of the said 'units'. The player who takes the last unit is the winner.
In this game, the 'pool' is 20 units and each player is allowed to take either one or two units from the pool at each of their turns. Easy right?
I've done my best in trying to make the computer as smart as possible, but it is still rather easy to beat once you know what to do. As this game is pretty simple, It is also already 'solved'. I used this information to program the computer to be as smart as possible.
Uses:
I made this game to be a 'time waster' of sorts, so might as well use it as one. It isn't really that complex of a game and it runs fast enough that you can have a full game finished in 30 seconds. So yeah, time waster.
Running the program:
This game can run in windows and any other OSes that have python.
For windows, simply launch the included sk_nim.exe file.
For linux and all else, open Terminal and change the directory to the directory of sk_nim.py.
Then, enter python sk_nim.py
Other Stuff:
I also threw in a crude 6-sided dice roller just because I thought I should have it in.
Also included is the source code of the game, if for any reason, you want to see how it was done.
Just a heads-up: it's pretty messy!
Oh, if you need more info and the like, refer to the readme. Or you can open the source code (sk_nim.py) using a text editor. I've commented it sufficiently enough.
Latest Blog
No blog entries have been posted yet.
- Completed
- karins_soulkeeper
Custom
- Puzzle
- 09/26/2014 01:27 AM
- 06/21/2022 03:50 PM
- 09/26/2014
- 17720
- 2
- 45
Pages:
1