Refresh web UI and make ML imports optional
All checks were successful
ci / tests (push) Successful in 21s

This commit is contained in:
dan
2025-12-25 09:15:10 +03:00
parent f542747d5e
commit 2499deb071
49 changed files with 4367 additions and 500 deletions

View File

@@ -15,7 +15,7 @@ def _auto_setup(env: CatanEnv) -> None:
def test_bank_trade_action_and_port_ratio() -> None:
env = CatanEnv(GameConfig(player_names=["Alice", "Bob"], seed=5))
env = CatanEnv(GameConfig(player_names=["Alice", "Bob", "Cara"], seed=5))
_auto_setup(env)
game = env.game
game.phase = Phase.MAIN
@@ -58,12 +58,13 @@ def test_bank_trade_action_and_port_ratio() -> None:
def test_player_trade_actions_available() -> None:
env = CatanEnv(GameConfig(player_names=["Alice", "Bob"], seed=11))
env = CatanEnv(GameConfig(player_names=["Alice", "Bob", "Cara"], seed=11))
_auto_setup(env)
game = env.game
game.phase = Phase.MAIN
game.has_rolled = True
alice, bob = game.players
alice = game.player_by_name("Alice")
bob = game.player_by_name("Bob")
alice.resources[Resource.WOOL] = 1
bob.resources[Resource.ORE] = 1