-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Take a look at this Comic.
Note that Hobbe's paw goes in a sort of semi-circle. Checkers pieces can change directions while in the middle of their recursion.
Currently I do not support this: For example, a Bishop has 4 recursive moves: NE Recursively, NW recursively, SE Recursively, and SW Recursively.
This worked well enough back when I was assuming pieces can't change directions in the middle of moving. It has the added bonus of preventing the infinite Loop Situation, where a Rook moves north, then south, then north and south and north ad infinitum.
A King-ed Checkers Piece has the same move direction options, regardless of location. They prove that unidirectional recursion, what I have now, doesn't work.
To check how Checkers Pieces move, I will have to switch from iterative recursion to branching recursion.
A Rook Now has two move generators instead of 4: Move Left or right recursively, or Up & Down Recursively.
The "Don't Jiggle back and forth in an infinite loop" can be dealt with by simply banning the previous square.