Neo-Poseidon/Player.rs

42 lines
688 B
Rust

enum Race {
Griffin,
Catte
}
impl Default for Race {
fn default() -> Self {
Race::Catte
}
}
struct ResearchItem {
levels: u8,
points: u16
}
impl Default for ResearchItem {
fn default() -> Self {
ResearchItem{
levels: 1,
points: 0
}
}
}
#[derive(Default)]
struct Research {
Weapons: ResearchItem,
Banking: ResearchItem,
Manufactoring: ResearchItem,
Terraforming: ResearchItem,
Hyperspace: ResearchItem,
Experimentation: ResearchItem,
Scanning: ResearchItem
}
#[derive(Default)]
struct Player {
Name: String,
Color: (u8, u8, u8),
Race: Race,
Research: Research
}