|
|
@ -168,7 +168,9 @@ int validate_pawn_move(int x1, int y1, int x2, int y2) { |
|
|
|
return validate_move(x1, y1, x2, y2); |
|
|
|
} |
|
|
|
|
|
|
|
int validate_knight_move(int x1, int y1, int x2, int y2) { return validate_move(x1, y1, x2, y2); } |
|
|
|
int validate_knight_move(int x1, int y1, int x2, int y2) { |
|
|
|
return validate_move(x1, y1, x2, y2); |
|
|
|
} |
|
|
|
|
|
|
|
int validate_bishop_move(int x1, int y1, int x2, int y2) { |
|
|
|
if (+(x2 - x1) != +(y2 - y1)) { |
|
|
@ -178,9 +180,17 @@ int validate_bishop_move(int x1, int y1, int x2, int y2) { |
|
|
|
return validate_move(x1, y1, x2, y2); |
|
|
|
} |
|
|
|
|
|
|
|
int validate_rook_move(int x1, int y1, int x2, int y2) { return validate_move(x1, y1, x2, y2); } |
|
|
|
int validate_queen_move(int x1, int y1, int x2, int y2) { return validate_move(x1, y1, x2, y2); } |
|
|
|
int validate_king_move(int x1, int y1, int x2, int y2) { return validate_move(x1, y1, x2, y2); } |
|
|
|
int validate_rook_move(int x1, int y1, int x2, int y2) { |
|
|
|
return validate_move(x1, y1, x2, y2); |
|
|
|
} |
|
|
|
|
|
|
|
int validate_queen_move(int x1, int y1, int x2, int y2) { |
|
|
|
return validate_move(x1, y1, x2, y2); |
|
|
|
} |
|
|
|
|
|
|
|
int validate_king_move(int x1, int y1, int x2, int y2) { |
|
|
|
return validate_move(x1, y1, x2, y2); |
|
|
|
} |
|
|
|
|
|
|
|
int file_to_board_index(char c) { |
|
|
|
if (c >= 'a') { |
|
|
|