diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/board/mod.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/board/mod.rs b/src/board/mod.rs index 8dbf476..e21aaf1 100644 --- a/src/board/mod.rs +++ b/src/board/mod.rs @@ -701,6 +701,11 @@ impl Board { return true } } + PieceType::King => { + if (self.attacks.king[square as usize] & piece > 0) { + return true + } + } PieceType::Knight => { if (self.attacks.knight[square as usize] & piece > 0) { return true @@ -721,7 +726,6 @@ impl Board { return true } } - PieceType::King => {} _ => panic!("Unexpected piece type! Pieces by color should be considered white") } } |