diff --git a/bamboo/src/boardfield.rs b/bamboo/src/boardfield.rs index 28550a4..011ab2d 100644 --- a/bamboo/src/boardfield.rs +++ b/bamboo/src/boardfield.rs @@ -92,7 +92,7 @@ impl BoardfieldOps for Boardfield { // bf2: 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 assert!(boardloc <= 63, "boardloc out of range"); - assert!(boardloc > 0, "boardloc out of range"); + assert!(boardloc >= 0, "boardloc out of range"); let field = self[(boardloc / 2) as usize]; let shift = 4 * (boardloc % 2); @@ -103,7 +103,7 @@ impl BoardfieldOps for Boardfield { #[allow(clippy::cast_sign_loss)] fn set_pos(&mut self, boardloc: isize, piece: u8) { assert!(boardloc <= 63, "boardloc out of range {boardloc}"); - assert!(boardloc > 0, "boardloc out of range {boardloc}"); + assert!(boardloc >= 0, "boardloc out of range {boardloc}"); let field = self[(boardloc / 2) as usize]; let shift = 4 * (boardloc % 2);