The opponent's goal pit, if reached, is skipped. The other player takes all the remaining stones from his or her own side, and places them in his or her goal pit.
Players count the stones in their goal pits.
The player with the most stones is the winner. Read through the lisp code for more information on each of the included functions. The move from the player is entered from the terminal as a number from 0 to 5. See the program for more information on the representation issues. It returns a new board position, the result of applying the given move on behalf of the given player.