prise de coin par puissance
This commit is contained in:
parent
33ad73103b
commit
a62e91a233
3 changed files with 153 additions and 5 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue