diff options
| author | Aargh Rai <aargh.rai+git@gmail.com> | 2026-05-26 14:07:15 +0530 |
|---|---|---|
| committer | Aargh Rai <aargh.rai+git@gmail.com> | 2026-05-26 14:07:15 +0530 |
| commit | 7e021a821b49306eaa8b0688e4b91d2db25d4878 (patch) | |
| tree | 83f2848245236f079fae5a6f790f96101c6f769c /src/search/pawn_moves.c | |
| parent | c8d8d1ddf9ff8d7900d41d885cdbf177f40f0cd1 (diff) | |
rook moves
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 ); } } |
