Just a few minor updates to the Haskell Spider Solitare code.
In preparation for implementing a Zipper and Travel B Tree we need a way of detecting repeated game positions. The Travel B Tree we use will be almost the same, except that each interior node will also have a data value as well, just the leaves.
I talk about the move tree for a given game being finite... but that is
not strictly correct. If you have a Jack, and there are two exposed Queens on the board, you can move the Jack back and forth between the two forever. So we're just going to look at the history and see if we're duplicating a position
There are also a few other little cleanups in the code.
Thursday, November 8, 2007
Subscribe to:
Posts (Atom)