lowercase colors

This commit is contained in:
Daniel Lovbrotte Olsen 2024-02-11 01:45:01 +01:00
parent bc8572caaa
commit 5a954d1c9a
1 changed files with 7 additions and 1 deletions

View File

@ -172,7 +172,7 @@ impl GameState {
let dist = WeightedIndex::new(&weights).unwrap(); let dist = WeightedIndex::new(&weights).unwrap();
let picked = choices[dist.sample(&mut self.rng)]; let picked = choices[dist.sample(&mut self.rng)];
self.bag.add_color(picked, -1)?; self.bag.add_color(picked, -1)?;
factory.add_color(picked, 1)?; factory.add_color(picked, 1)?;
} }
@ -771,11 +771,17 @@ impl PatternLine {
#[derive(Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq)] #[derive(Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq)]
enum Color { enum Color {
#[serde(rename = "start")]
Start, Start,
#[serde(rename = "blue")]
Blue, Blue,
#[serde(rename = "yellow")]
Yellow, Yellow,
#[serde(rename = "red")]
Red, Red,
#[serde(rename = "black")]
Black, Black,
#[serde(rename = "white")]
White, White,
} }