On Wed 11 Aug 2004 (23:24 -0400), Adam wrote:
Where in the source can I find the code that checks if a player has
made a legal move?
play.c CommandMove() begins on line 2967.
At line 3080 if( ( c = ParseMove( sz, an ) ) > 0 ) {
here if parses the submitted move, then makes a copy of the current
board position in anBoardNew[][] updating it with the move
It then calls GenerateMoves() to get a list of legal moves. For each
legal move, which is supplied with a position key for the resulting
board, it generates anBoardTest[][] and compares it to the position
resulting from the submitted move in anBoardNew[][]. If it finds a
match, it has found a legal move.
--
Jim Segrave address@hidden