Neo-Poseidon/game/mod.rs

22 lines
416 B
Rust

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) {
let mut player: Player = Player::default();
player.name = name;
self.players.push(player);
}
}