diff --git a/game/src/util/hex.rs b/game/src/util/hex.rs index fda692f..0710ad5 100644 --- a/game/src/util/hex.rs +++ b/game/src/util/hex.rs @@ -31,11 +31,11 @@ impl Hex { pub fn from_tile(tile:u8) -> Self { - let mut x = 0; + let mut x = 0i32; while tile >= ROWS[x as usize + 1] { x += 1; } - let y = tile - ROWS[x as usize] + ((x > 4) as u8 * (x - 4)); + let y = tile - ROWS[x as usize] + ((x > 4) as i32 * (x - 4)) as u8; Self { - x, + x:x as u8, y, tile, } diff --git a/www/.html b/www/.html index a52b463..0dffd91 100644 --- a/www/.html +++ b/www/.html @@ -5,7 +5,7 @@ - +