Neo-Poseidon/Player.rs

42 lines
688 B
Rust
Raw Normal View History

2019-01-23 21:04:52 +01:00
enum Race {
Griffin,
2019-01-24 01:43:57 +01:00
Catte
2019-01-23 21:04:52 +01:00
}
2019-05-06 01:28:22 +02:00
impl Default for Race {
fn default() -> Self {
Race::Catte
}
}
2019-01-23 21:04:52 +01:00
2019-01-24 01:43:57 +01:00
struct ResearchItem {
levels: u8,
points: u16
2019-01-23 21:04:52 +01:00
}
2019-05-06 01:28:22 +02:00
impl Default for ResearchItem {
fn default() -> Self {
ResearchItem{
levels: 1,
points: 0
}
}
}
2019-01-23 21:04:52 +01:00
2019-05-06 01:28:22 +02:00
#[derive(Default)]
2019-01-24 01:43:57 +01:00
struct Research {
2019-05-06 01:28:22 +02:00
Weapons: ResearchItem,
2019-01-24 01:43:57 +01:00
Banking: ResearchItem,
Manufactoring: ResearchItem,
Terraforming: ResearchItem,
Hyperspace: ResearchItem,
Experimentation: ResearchItem,
Scanning: ResearchItem
2019-01-23 21:04:52 +01:00
}
2019-05-06 01:28:22 +02:00
#[derive(Default)]
2019-01-23 21:04:52 +01:00
struct Player {
Name: String,
Color: (u8, u8, u8),
Race: Race,
2019-05-06 01:28:22 +02:00
Research: Research
}