fix 84 (CH3 was missing)

This commit is contained in:
Dr. Matthias Ratajczak
2022-09-27 20:02:23 +02:00
parent 1edca7b0ed
commit b3354a22c0
2 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -46,7 +46,7 @@ pub enum Squares {
CC3 = 33, CC3 = 33,
G3 = 34, G3 = 34,
R4 = 35, R4 = 35,
Ch3 = 36, CH3 = 36,
H1 = 37, H1 = 37,
T2 = 38, T2 = 38,
H2 = 39, H2 = 39,
@@ -170,6 +170,7 @@ impl Monopoly {
Squares::CC3 => self.handle_community_chest(Squares::CC3), Squares::CC3 => self.handle_community_chest(Squares::CC3),
Squares::CH1 => self.handle_chance(Squares::CH1), Squares::CH1 => self.handle_chance(Squares::CH1),
Squares::CH2 => self.handle_chance(Squares::CH2), Squares::CH2 => self.handle_chance(Squares::CH2),
Squares::CH3 => self.handle_chance(Squares::CH3),
_ => square, _ => square,
} }
} }
+3 -3
View File
@@ -1,8 +1,8 @@
mod lib; use euler84::{Dice, Monopoly, Statistics};
fn main() { fn main() {
let monopoly = lib::Monopoly::new(lib::Dice::SixSided); let monopoly = Monopoly::new(Dice::SixSided);
let mut statistics = lib::Statistics::new(monopoly, 10_000_000); let mut statistics = Statistics::new(monopoly, 50_000_000);
statistics.run(); statistics.run();
statistics.show(); statistics.show();
} }