From e455c97c67bae1e5a633c8eeee1ce028a05032c1 Mon Sep 17 00:00:00 2001 From: Markus Wagner Date: Tue, 5 Jan 2021 21:19:54 +0100 Subject: [PATCH] Fix supply card quantities based on player count --- src/main.rs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index 8b1426d..8d34ca2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -189,13 +189,18 @@ impl Game { p.draw(5); } + let victory_qty = match self.players.len() { + x if x <=2 => 8, + _ => 12, + }; + self.supply = vec![ - ("Copper".into(), 46), - ("Silver".into(), 38), + ("Copper".into(), 60 - self.players.len() * 7), + ("Silver".into(), 40), ("Gold".into(), 30), - ("Estate".into(), 8), - ("Duchery".into(), 8), - ("Province".into(), 8), + ("Estate".into(), victory_qty), + ("Duchery".into(), victory_qty), + ("Province".into(), victory_qty), ("Curse".into(), 10), ("Cellar".into(), 10), ("Moat".into(), 10),