From 5a954d1c9afdcaf096c99a41706272825818343f Mon Sep 17 00:00:00 2001 From: Daniel Olsen Date: Sun, 11 Feb 2024 01:45:01 +0100 Subject: [PATCH] lowercase colors --- src/azul.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/azul.rs b/src/azul.rs index 7718a41..9d148af 100644 --- a/src/azul.rs +++ b/src/azul.rs @@ -172,7 +172,7 @@ impl GameState { let dist = WeightedIndex::new(&weights).unwrap(); let picked = choices[dist.sample(&mut self.rng)]; - + self.bag.add_color(picked, -1)?; factory.add_color(picked, 1)?; } @@ -771,11 +771,17 @@ impl PatternLine { #[derive(Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq)] enum Color { + #[serde(rename = "start")] Start, + #[serde(rename = "blue")] Blue, + #[serde(rename = "yellow")] Yellow, + #[serde(rename = "red")] Red, + #[serde(rename = "black")] Black, + #[serde(rename = "white")] White, }