Function cozy_chess::get_knight_moves
source · pub const fn get_knight_moves(square: Square) -> BitBoard
Expand description
Get the knight moves for a knight on some square.
§Examples
let moves = get_knight_moves(Square::D3);
assert_eq!(moves, bitboard! {
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . X . X . . .
. X . . . X . .
. . . . . . . .
. X . . . X . .
. . X . X . . .
});