Add 'board::Direction' enum

This commit is contained in:
Bruno BELANYI 2022-07-17 23:06:43 +02:00
parent c177d13b75
commit b840bfc570
2 changed files with 25 additions and 0 deletions

22
src/board/directions.rs Normal file
View file

@ -0,0 +1,22 @@
/// A direction on the board. Either along the rook, bishop, or knight directions
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum Direction {
North,
West,
South,
East,
NorthWest,
SouthWest,
SouthEast,
NorthEast,
NorthNorthWest,
NorthWestWest,
SouthWestWest,
SouthSouthWest,
SouthSouthEast,
SouthEastEast,
NorthEastEast,
NorthNorthEast,
}

View file

@ -1,6 +1,9 @@
pub mod bitboard;
pub use bitboard::*;
pub mod directions;
pub use directions::*;
pub mod file;
pub use file::*;