game
This commit is contained in:
parent
bae0ff6301
commit
2f096e0bae
1 changed files with 19 additions and 0 deletions
19
server/src/game.rs
Normal file
19
server/src/game.rs
Normal 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,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue