From b1fc8a4e6029221db8ebe297b55250839fbf1197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20L=C3=B8vbr=C3=B8tte=20Olsen?= Date: Wed, 10 Oct 2018 18:14:30 +0200 Subject: [PATCH] reee --- types2.rs | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 types2.rs diff --git a/types2.rs b/types2.rs new file mode 100644 index 0000000..0b6b3b4 --- /dev/null +++ b/types2.rs @@ -0,0 +1,35 @@ +struct Game { + name: String, + players: vec, + max_players: + stars: vec, + settings: Settings +} + +struct Player { + name: String, + color: (u8, u8, u8), + tech: vec<(Tech)>, + research_queue: vec, + money: u16 +} + +trait On_Cycle { + fn active(&self) {}; +} + +struct Tech { + name: str, + description: str, + points: u32 +} + +impl On_Cycle for Tech { + pub fn active(&self, game: &Game) { + if game.settings.mode = "vanilla" { + match self.name { + "Experimentation" => experimentation(game.players[???]) + } + } + }; +} \ No newline at end of file