14.1 Game: Phase 2 - Advanced Scoring and Re-Rack Logic #19

Closed
opened 2025-06-20 14:26:01 +02:00 by cursor · 0 comments
Collaborator

This is the second phase for the 14.1 Endless implementation.

Parent Issue: #15
Depends On: #18

Tasks

  • Score Calculation:
    • Calculate points for a turn: (Balls at start of turn) - (Balls at end of turn).
    • The initial state is 15 balls, and this value must be correctly updated after each turn.
  • Re-Rack Input:
    • Add buttons for a player to signal a re-rack (+14 balls) or a full re-rack after pocketing all 15 balls (+15 balls).
    • This input will adjust the "balls at start of turn" for the calculation.
  • Foul Integration: The score for a turn must be adjusted by any fouls committed. For example: Score = (Calculated pots) - (Foul penalties).

Acceptance Criteria

  • The score for a turn is correctly calculated based on the number of remaining balls entered.
  • The "balls at start of turn" value is correctly tracked from one turn to the next.
  • The Re-rack (+14) button correctly adjusts the number of balls for the next turn's calculation.
  • The Full Re-rack (+15) button correctly adjusts the number of balls.
  • Foul penalties (from the next phase) are correctly subtracted from the turn's calculated score. (This will require linking with the foul system).
This is the second phase for the 14.1 Endless implementation. **Parent Issue:** #15 **Depends On:** #18 ### Tasks - **Score Calculation**: - Calculate points for a turn: `(Balls at start of turn) - (Balls at end of turn)`. - The initial state is 15 balls, and this value must be correctly updated after each turn. - **Re-Rack Input**: - Add buttons for a player to signal a re-rack (+14 balls) or a full re-rack after pocketing all 15 balls (+15 balls). - This input will adjust the "balls at start of turn" for the calculation. - **Foul Integration**: The score for a turn must be adjusted by any fouls committed. For example: `Score = (Calculated pots) - (Foul penalties)`. ### Acceptance Criteria - The score for a turn is correctly calculated based on the number of remaining balls entered. - The "balls at start of turn" value is correctly tracked from one turn to the next. - The Re-rack (+14) button correctly adjusts the number of balls for the next turn's calculation. - The Full Re-rack (+15) button correctly adjusts the number of balls. - Foul penalties (from the next phase) are correctly subtracted from the turn's calculated score. (This will require linking with the foul system).
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: froxxxy/bscscore#19