Saturday, May 01, 2021

Game of Nimm

Coding is so fun!!! Where was I ages ago when I learned coding in my undergrad degree? Probably, people can change, you may be disinterested with something in a moment in your life, but you can get hook by it at another moment in your life. So yeah, this my code for a game of Nimm, where the rules are: each player can only pick one or two stones and the player who picks the last stone loose. In the code below, I play with the computer that operates on random function.


I don't know how to insert a code without making it messy, so I put the code in the form of picture. If you are interested, you can find the code in my github account here: https://github.com/Yuti-AI/Games/commit/bafda1edf14c5bea10d41c53ae7992573bf30376

After trying different environments: PyCharm, Anaconda, Spyder and Visual Studio Code, I like VSC the best. So will stay with that one until I find a better one. 

No comments:

Untuk Papa

Papa …  Kini senyum itu tak bisa lagi kulihat  Kebaikan itu tak bisa lagi kudapat  Tapi jasa papa tetap melekat  Hangat itu tetap mendekap  ...