Preliminary: Getting and Running the Nim Procedures

First get the text book's Nim code by downloading this zip file: nim.zip. Extract (unzip) the file to create the folder nim, which will contain these files (see links in menu at left):

This is the barebones version given in the text book, with a few additions for this assignment. Note that nim.scm requires game-state-4.scm, which is the fourth representation of the game state representations discussed in Chapter 6. The other three representations would work just as well, but we will stick with the fourth, which creates compound data using the cons procedure.

Open nim.scm in DrRacket, click Run, and evaluate

          (nim-test 8 5 'human)
in the interactions window. Play a game to completion to make sure the code is working.