A downloadable game

A simple NIM game made for college project in 1 day

You choose a max amount of coins that can be played by you or computer in 1 turn

The computer selects the number of coins in the tower

You and the computer take turns adding coins to the tower, whoever puts the final coin loses. You both can play 1-the max number of coins you selected

After giving it a few tries check out the how to win section!



------To win----

The secret of the game is that the height of the tower is determined by a formula based on two variables, 

K - the max amount of coins you can play in 1 turn (selected by you), so you and computer play 1 to K coins per turn

n - a random number greater or equal to one, for the game's sake it's limited to keep the tower height a reasonable amount

The height of the tower is determined by

(k+1)n + 1.

So if k = 3, height of the tower will be 1+ a multiple of 4, so 1+ 12 = 13 coins or 1+ 16 = 17 coins

The way to win knowing this is to always end your turn on a multiple of k+1 ! so if k = 3, then end on 4, 8, 12, 16. As you can notice, these numbers are always 1 less than the height of the tower I,e 17, 13. So if you end on 12, the computer has to play the 13th coin and lose, and if you end on 16, then the computer has to play 17th coin and lose

To win all the time, the computer needs to go first and you need to always end on max number of coins per turn + 1.

Download

Download
Game.zip 147 MB

Install instructions

Unzip and the run the .exe inside!

Leave a comment

Log in with itch.io to leave a comment.