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/bitboard.c | |
| parent | c8d8d1ddf9ff8d7900d41d885cdbf177f40f0cd1 (diff) | |
rook moves
Diffstat (limited to 'src/bitboard.c')
| -rw-r--r-- | src/bitboard.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/bitboard.c b/src/bitboard.c index afc7867..4746020 100644 --- a/src/bitboard.c +++ b/src/bitboard.c @@ -20,26 +20,26 @@ position_t position_starting() { 71776119061217280ULL, }, .castling = - (1 << WHITE_SHORT_CASTLE) | - (1 << WHITE_LONG_CASTLE) | - (1 << BLACK_SHORT_CASTLE) | - (1 << BLACK_LONG_CASTLE), + ((bitboard_t)1 << WHITE_SHORT_CASTLE) | + ((bitboard_t)1 << WHITE_LONG_CASTLE) | + ((bitboard_t)1 << BLACK_SHORT_CASTLE) | + ((bitboard_t)1 << BLACK_LONG_CASTLE), .turn = WHITE_TURN, - .passantable_column = 0, + .passantable_file = 0, }; } void assert_valid_position(position_t position) { assert(position.castling <= ( - (1 << WHITE_SHORT_CASTLE) | - (1 << WHITE_LONG_CASTLE) | - (1 << BLACK_SHORT_CASTLE) | - (1 << BLACK_LONG_CASTLE) + ((bitboard_t)1 << WHITE_SHORT_CASTLE) | + ((bitboard_t)1 << WHITE_LONG_CASTLE) | + ((bitboard_t)1 << BLACK_SHORT_CASTLE) | + ((bitboard_t)1 << BLACK_LONG_CASTLE) ) ); assert(position.turn == WHITE_TURN || position.turn == BLACK_TURN); - assert(position.passantable_column <= 8); + assert(position.passantable_file <= 8); assert(position.bitboards[WHITE_KING] != 0); assert(position.bitboards[BLACK_KING] != 0); } |
