This repository has been archived on 2026-04-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Neo-Poseidon/game/mod.rs
Daniel Løvbrøtte Olsen d3d47b0cb3 add another player
2019-05-09 01:16:43 +02:00

21 lines
448 B
Rust

pub mod player;
mod star;
mod carrier;
use self::player::Player;
use self::star::Star;
use self::carrier::Carrier;
#[derive(Default,Debug)]
pub struct Game {
players: Vec<Player>,
stars: Vec<Star>,
carriers: Vec<Carrier>
}
impl Game {
pub fn addPlayer(&mut self, name: String, color: Option<(u8,u8,u8)>, race: Option<player::Race>) {
let player = Player::new(name, color, race);
self.players.push(player);
}
}