X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=moves.c;h=1e9ba9e91f65492e55b94a8085e6502f996d8ea1;hb=4d13e321177f50fb53e4cec3335c9d3966c88308;hp=b5b6ffe3bc00a50173fb0e8eab959b6e3183ea86;hpb=ca36e348da9cde9d3cb1302cad108c92d3ba8ba7;p=xboard.git diff --git a/moves.c b/moves.c index b5b6ffe..1e9ba9e 100644 --- a/moves.c +++ b/moves.c @@ -408,8 +408,8 @@ MovesFromString (Board board, int flags, int f, int r, int tx, int ty, int angle if(y < 0 || y >= BOARD_HEIGHT) break; // vertically off-board: always done if(x < BOARD_LEFT) { if(mode & 128) x += BOARD_RGHT - BOARD_LEFT, loop++; else break; } if(x >= BOARD_RGHT) { if(mode & 128) x -= BOARD_RGHT - BOARD_LEFT, loop++; else break; } - if(board[y][x] == DarkSquare) break; // black squares are supposed to be off board if(j) { j--; continue; } // skip irrespective of occupation + if(board[y][x] == DarkSquare) break; // black squares are supposed to be off board if(!jump && board[y - vy + vy/2][x - vx + vx/2] != EmptySquare) break; // blocked if(jump > 1 && board[y - vy + vy/2][x - vx + vx/2] == EmptySquare) break; // no hop if(x == f && y == r && !loop) occup = 4; else // start square counts as empty (if not around cylinder!)