From 889cced7bb991fdeab5c7fa9fddc7135e582178f Mon Sep 17 00:00:00 2001 From: team3 Date: Thu, 23 Jul 2026 07:10:11 +0200 Subject: [PATCH] =?UTF-8?q?Kein=20Shop=20bei=201-2=20=E2=80=94=20erste=20W?= =?UTF-8?q?are=20ab=201-3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- backend/tests/test_game.py | 2 +- backend/tft/sim/game.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/tests/test_game.py b/backend/tests/test_game.py index d5a8b34..9b4f7a6 100644 --- a/backend/tests/test_game.py +++ b/backend/tests/test_game.py @@ -38,7 +38,7 @@ def test_same_seed_same_outcome(art, cfg): def test_buy_and_merge(art, cfg): game = Game(art, cfg, seed=1) game.gold = 100 - api = next(a for a in game.shop if a) + api = "U1_0" unit = {"api_name": api, "stars": 1, "items": []} game.bench = [dict(unit), dict(unit)] game.pool.take(api, 2) diff --git a/backend/tft/sim/game.py b/backend/tft/sim/game.py index e7a76a0..70855c9 100644 --- a/backend/tft/sim/game.py +++ b/backend/tft/sim/game.py @@ -48,8 +48,9 @@ class Game: for p in self.players: self._carousel(p) self.idx += 1 + # Bei 1-2 gibt es noch keinen Shop — niemand hat Gold. for p in self.players: - player.refresh_shop(p, self.pool, cfg, self.rng) + p.shop = [None] * cfg["shop"]["slots"] self._maybe_offer_augment() # ---- helpers ----