feat: Karel Peeters board game implementation

This commit is contained in:
Henri Bourcereau 2025-08-26 21:04:13 +02:00
parent 866ba611a6
commit f2a89f60bc
10 changed files with 494 additions and 92 deletions

View file

@ -4,7 +4,7 @@ use std::fmt;
// This just makes it easier to dissern between a player id and any ol' u64
pub type PlayerId = u64;
#[derive(Copy, Debug, Clone, PartialEq, Serialize, Deserialize)]
#[derive(Copy, Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub enum Color {
White,
Black,
@ -20,7 +20,7 @@ impl Color {
}
/// Struct for storing player related data.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct Player {
pub name: String,
pub color: Color,