This commit is contained in:
AlphaCodingPilot 2023-01-03 19:34:48 +01:00
commit 2f096e0bae

19
server/src/game.rs Normal file
View file

@ -0,0 +1,19 @@
pub struct Game {
pub players: Vec<Player>,
seed: String,
}
impl Game {
pub fn new(players: usize, seed: String) -> Self {
Self {
players: vec![Player::new(); players],
seed,
}
}
}
#[derive(Serialize, Deserialize)]
struct GameData {
players: Vec<PlayerData>,
seed: String,
}