Skip to content

Commit

Permalink
Fix Move comment
Browse files Browse the repository at this point in the history
  • Loading branch information
eduherminio committed Feb 8, 2024
1 parent 93a531d commit 1c48483
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Lynx/Model/Move.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ public enum SpecialMoveType
}

/// <summary>
/// Binary move bits Hexadecimal
/// 0000 0000 0000 0000 0000 0000 0000 1111 0xF Promoted piece (~11 bits)
/// 0000 0000 0000 0000 0000 0011 1111 0000 0x3F0 Source square (63 bits)
/// 0000 0000 0000 0000 1111 1100 0000 0000 0xFC00 Target Square (63 bits)
/// Binary move bits Hexadecimal
/// 0000 0000 0000 0000 0000 0000 0000 1111 0xF Promoted piece (0-11)
/// 0000 0000 0000 0000 0000 0011 1111 0000 0x3F0 Source square (0-63)
/// 0000 0000 0000 0000 1111 1100 0000 0000 0xFC00 Target Square (0-63)
/// --------------------------------------------------------------------------------------------
/// 0000 0000 0000 1111 0000 0000 0000 0000 0xF_0000 Piece (11 bits)
/// 0000 0000 1111 0000 0000 0000 0000 0000 0xF0_0000 Captured piece (11 bits)
/// 0000 0001 0000 0000 0000 0000 0000 0000 0x100_0000 Capture flag
/// 0000 1110 0000 0000 0000 0000 0000 0000 0xE00_0000 SpecialMoveFlagOffset: Double pawn push, en-passant, short castle or long castle
/// 0000 0000 0000 1111 0000 0000 0000 0000 0xF_0000 Piece (0-11)
/// 0000 0000 1111 0000 0000 0000 0000 0000 0xF0_0000 Captured piece (0-11)
/// 0000 0001 0000 0000 0000 0000 0000 0000 0x100_0000 Capture flag (1)
/// 0000 1110 0000 0000 0000 0000 0000 0000 0xE00_0000 SpecialMoveFlagOffset: Double pawn push, en-passant, short castle or long castle (1-5)
/// Total: 28 bits -> fits an int
/// By casting it to ShortMove, a unique int16 (short) move is achieved, since
/// source and target square and promoted piece can only represent a move in a given position
Expand Down

0 comments on commit 1c48483

Please sign in to comment.