diff options
Diffstat (limited to 'src/search/pawn_moves.c')
| -rw-r--r-- | src/search/pawn_moves.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/search/pawn_moves.c b/src/search/pawn_moves.c index fbf2bad..6b85cc2 100644 --- a/src/search/pawn_moves.c +++ b/src/search/pawn_moves.c @@ -88,7 +88,7 @@ void get_pawn_moves(moves_t* moves, position_t position) { } } - if (position.passantable_column != 0) { + if (position.passantable_file != 0) { bitboard_t PASSANT_RANK; int rank_shift; int from_shift; @@ -103,15 +103,15 @@ void get_pawn_moves(moves_t* moves, position_t position) { } int left = 0, right = 0; - if (position.passantable_column > 1) left = position.passantable_column - 1; - if (position.passantable_column < 8) right = position.passantable_column + 1; + if (position.passantable_file > 1) left = position.passantable_file - 1; + if (position.passantable_file < 8) right = position.passantable_file + 1; if (left != 0) { bitboard_t MASK = file_masks[left - 1] & friendly_pawns & PASSANT_RANK; if (MASK != 0) { add_move( moves, left + rank_shift + from_shift, - position.passantable_column + rank_shift - 1 + position.passantable_file + rank_shift - 1 ); } } @@ -121,7 +121,7 @@ void get_pawn_moves(moves_t* moves, position_t position) { add_move( moves, right + rank_shift + from_shift, - position.passantable_column + rank_shift - 1 + position.passantable_file + rank_shift - 1 ); } } |
