chesspos
Useful structs and constants for representing chess board positions.
Position
The main point of this library is the Position
struct, which represents a position on a chess board.
use *;
// each position is defined as a const,
// and can be referred to like this:
let a4 = A4;
// the Position struct has various methods
// useful for chess programming
assert_eq!; // get the position to the right of A4
assert!; // no position to the left of A4
Rank & File
There's also a Rank
and a File
enum, which is useful for traversal and iteration.
use *;
assert_eq!;
assert_eq!;