Add 'board::Direction' enum
This commit is contained in:
parent
e8b5c9f73c
commit
4e98678ccd
22
src/board/directions.rs
Normal file
22
src/board/directions.rs
Normal 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,
|
||||||
|
}
|
|
@ -1,6 +1,9 @@
|
||||||
pub mod bitboard;
|
pub mod bitboard;
|
||||||
pub use bitboard::*;
|
pub use bitboard::*;
|
||||||
|
|
||||||
|
pub mod directions;
|
||||||
|
pub use directions::*;
|
||||||
|
|
||||||
pub mod file;
|
pub mod file;
|
||||||
pub use file::*;
|
pub use file::*;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue