StefanoFiumara/medieval-conquerors-godot

Implement Turn System

Closed this issue · 0 comments

Implement a turn system that restricts players to only taking actions during their turn.

  • ChangeTurnAction Should:

    • Contain which player's turn we are changing to (player ID)
  • Match Should:

    • Track the ID of the player whose turn it currently is.
  • BeginGameAction Should:

    • Contain which player takes the first turn of the game (player ID)
  • TurnSystem Should:

    • Respond to BeginGameAction
      • Shuffle each player's deck (React with ShuffleDeckAction)
      • Draw the starting hand for both players (React with DrawCardsAction)
      • ChangeTurn to the starting player (React with ChangeTurnAction)
    • Respond to a ChangeTurnAction
      • Update Match information to track current player index
  • HandSystem Should:

    • Respond to a ChangeTurnAction
    • Draw a card for the next player's turn (React with DrawCardsAction)
  • PlayerSystem Should:

    • Respond to a ChangeTurnAction
      • Reset any card attributes that are per-turn abilities (MoveableAttribute)
    • Respond to a ShuffleDeckAction
      • Shuffle the specified player's deck
  • Ensure all existing unit tests pass with these new systems in place
  • Write new unit tests to verify functionality