implemented conversion method to_index for struct BoardSquare

This commit is contained in:
Varga Dávid Lajos
2025-11-21 14:09:02 +01:00
parent f29298731b
commit c414485891

View File

@@ -41,5 +41,8 @@ impl BoardSquare {
return Self {x: file as usize, y: rank as usize};
}
pub(in super) fn to_index(&self) -> u8 {
return (8 * self.y + self.x) as u8;
}
}