prise de coin par puissance

This commit is contained in:
Henri Bourcereau 2024-05-08 21:17:13 +02:00
parent 33ad73103b
commit a62e91a233
3 changed files with 153 additions and 5 deletions

View file

@ -10,6 +10,15 @@ pub enum Color {
Black,
}
impl Color {
pub fn opponent_color(&self) -> Self {
match self {
Self::White => Self::Black,
Self::Black => Self::White,
}
}
}
/// Struct for storing player related data.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Player {