From 7c63ff83d048a2ea7f6c1e49cdc7804cff996a57 Mon Sep 17 00:00:00 2001 From: c0repwn3r Date: Wed, 15 Feb 2023 13:55:47 -0500 Subject: [PATCH] fixup tests --- bamboo/src/boardfield.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);