Notes for the Checkers Macro's implementation

Assuming that the board is numbered and layed out like it is here, here are some rules that will need to be coded. These are all from the RED point of view (the top of the board).

all moves require that the moved to loc is empty

if ROW is ODD, a valid move is: loc + 4 || loc + 5

if ROW is EVEN, a valid move is: loc + 3 || loc + 4

if ROW is ODD and (loc MOD 4 = 0), a valid move is: loc + 4
this is the right edge move

if ROW is EVEN and ((loc - 1)MOD 4 = 0), a valid move is: loc + 4
this is the left edge move

a jump is valid if: (loc + 9 || loc + 7) && (END ROW is CURRENT_ROW + 2) && (END_LOC is EMPTY) && (JUMPED OVER LOC is WHITE)

Need to put in rules around how to get your pieces KINGed

MoinMoin: JosYule/CheckersMacro (last edited 2007-10-29 19:10:12 by localhost)