diff --git a/Player.rs b/Player.rs index e173fd3..7577942 100644 --- a/Player.rs +++ b/Player.rs @@ -2,14 +2,28 @@ 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 + Weapons: ResearchItem, Banking: ResearchItem, Manufactoring: ResearchItem, Terraforming: ResearchItem, @@ -18,9 +32,10 @@ struct Research { Scanning: ResearchItem } +#[derive(Default)] struct Player { Name: String, Color: (u8, u8, u8), Race: Race, - Research -} \ No newline at end of file + Research: Research +}