Skip to main content

✅ Start game initializes decks

CategoryAbility
StatusPassing
Testtests/test_turn_sequence.py::test_start_game_initializes_decks

start_game sets up demon decks, timekeeping decks, and hands.

Preconditions

  • Fresh state from new_game_state().

  • DeterministicRNG(seed=42).

Action

  • start_game(state, rng)
result = start_game(state, rng)

Expected Postconditions

  • Each player's timekeeping_deck has exactly 2 cards (4 dealt, 2 drawn into hand).

  • Each player's hand has exactly 2 cards.

  • Each player's demon_deck has 116 cards (120 - 4 dealt to timekeeping).

  • cycle = 1, rest_period = 1, phase = Phase.CONTRACT.

  • Neither player has a time token.

  • Total cards per player (hand + timekeeping + demon_deck) = 120.

Assertions

assert len(player.timekeeping_deck) == 2
assert len(player.hand) == 2
assert len(player.demon_deck) == 116
assert total == 120
assert not player.has_time_token
assert result.cycle == 1
assert result.rest_period == 1
assert result.phase == Phase.CONTRACT
assert state.players[Side.PLAYER_1].demon_deck == [] # original not mutated