Constant poirebot::game::pieces::ANTI_DIAGONALS[][src]

pub const ANTI_DIAGONALS: &[BitBoard; 15];

The 15 diagonals parallel to the anti diagonal. Starts from the bottom to the top, with the main diagonal in the middle:

  • index 0: a1
  • index 1: a2 -> b1 …
  • index 7: a8 to h1 (anti diagonal)
  • index 8: a2 to g8 …
  • index 14: h8 A trick to get the diagonal matching a tile is to use the index rank + file (0-indexed) Or just use the provided get_anti_diagonal.