(42S) NIM - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: General Software Library (/forum-13.html) +--- Thread: (42S) NIM (/thread-1821.html) |
(42S) NIM - Thomas Klemm - 07-12-2014 08:33 PM This implementation of the strategy game Nim is how it was played in the film L'Année dernière à Marienbad using 4 heaps with 1, 3, 5 and 7 objects (e.g. matches or coins). However it is not played using the misère game condition. But this isn't difficult to change. It's a boring game: you always have to start. The calculator always wins. Code: 00 { 142-Byte Prgm } Example: XEQ "NIM" 1 3 5 7 A B C D 1 D 1 3 4 6 A B C D 1 C 1 3 3 1 A B C D 1 B 1 2 3 0 A B C D 1 A 0 2 2 0 A B C D 2 B 0 0 0 0 A B C D If you wanted to play using the misère game condition the last move would have just taken 1 object from heap C. |