Precomputed king and knight attack tables. More...
#include "scid/core/primitives.h"
Include dependency graph for attacks.h:Go to the source code of this file.
Namespaces | |
| namespace | scid |
| Public namespace for libscid. | |
| namespace | scid::core |
| Chess games, positions, movetext and notation. | |
Variables | |
| const squareT | scid::core::knightAttacks [66][9] |
| Knight attack targets for each square, terminated by NULL_SQUARE. | |
| const squareT | scid::core::kingAttacks [66][9] |
| King attack targets for each square, excluding castling, terminated by NULL_SQUARE. | |
Precomputed king and knight attack tables.
Each attack list has room for eight legal targets plus a NULL_SQUARE terminator. The COLOR_SQUARE and NULL_SQUARE sentinel rows contain only NULL_SQUARE values, so callers can iterate without first testing whether the source square is a normal board square.