Skip to content

Fix/restrict guesses to active team#76

Merged
tasaje1 merged 3 commits into
developmentfrom
fix/restrict-guesses-to-active-team
Jun 12, 2026
Merged

Fix/restrict guesses to active team#76
tasaje1 merged 3 commits into
developmentfrom
fix/restrict-guesses-to-active-team

Conversation

@tasaje1

@tasaje1 tasaje1 commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Context

This PR fixes the frontend guess permission flow so only the active operative team can select cards and submit guesses.

Description

Operatives can now only select cards when their own team is currently in the operative guessing phase. The guess submission flow now uses the current player’s actual team from the lobby state instead of deriving the team from the current turn.

This prevents players from the inactive team from selecting cards or sending guesses as the active team.

Changes in the code base

Restrict card selection to the active operative team
Pass the current player team into guess submission
Validate guess submission against the active operative turn
Prevent null-team, wrong-team, spymaster-phase, blank-lobby, and empty-position guess submissions
Add ViewModel tests for active-team guess validation and error handling
Add UI test coverage for inactive operatives not being able to select cards

Changes outside the code base

N/A

Additional information

N/A

@sonarqubecloud

Copy link
Copy Markdown

@the-only-queen-anna the-only-queen-anna left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ist getestet, funktioniert einwandfrei. Danke!

@tasaje1 tasaje1 merged commit 3203dbf into development Jun 12, 2026
2 checks passed
@tasaje1 tasaje1 linked an issue Jun 12, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Operator aus falschen Team können guesses abschicken

2 participants