Detailed Description of Use Case: Implement code that checks the victory conditions in the game based on the health of the cards on the board.
Related Requirements: Definition of the game rules and initial health of the cards.
Objective in Context: Ensure that the game can correctly determine a winner based on the condition that all of the opponent´s board cards have 0 hp.
Preconditions: All cards must be correctly initialized on the board with full health at the start of the match.
Successful Completion Condition: The game correctly identifies the end of the match when all of the opponent´s board cards have 0 hp and declares the user as the winner.
Failure Completion Condition: The game does not end or incorrectly declares a winner when the victory conditions are not met.
Primary Actors: Game developer.
Secondary Actors: N/A
Trigger: The game proceeds to the point where one of the parties could win according to the established rules.
Main Flow:
The game begins and the cards face each other according to the rules.
The system constantly checks the health os the cards on the opponent´s board.
When all of the opponent´s cards reach 0 hp, the system declares the user as the winner.