NIM (QL) SU8412w033115Nim.mdv =============================================================================== NOTE: The microdrive cartridge is in a format readable by the QLAY emulator. Files on the cartridge: BOOT (SuperBasic) NIM (SuperBasic) =============================================================================== OUR FIRST game for the QL is that old favourite Nim, programmed by Arthur Douglass of London. The QL displays five rows of blocks, and you may take any number of blocks from a single row. The winner is the player who takes the last block. The program is in two listings. Listing One should be saved using: save mdv1_BOOT and Listing Two should be saved using: save mdv1_NIM. Nim uses several simple procedures which may be of use to novice programmers, including one to centre text on the screen and another to halt the program until ENTER is pressed. The program uses our special abbreviations for graphics characters, so please read the instructions on this page before entering the program. NOTE: from all the other Nim listings I've had to type in, surely the player who takes the last block is the one who loses...? Still, it looks like in this listing, it's the other way round. Talking of losses, even with ONE DAY'S EXPERIENCE of QL SuperBasic I can see there were #s missing in the FLASH, BORDER, PRINT and AT statement in lines 220, 640 and 650. ==================================================== Text and programs typed by Jim Waterman, April 2020. ====================================================