Skip to content

Feature/90 cheat detection#91

Merged
tasaje1 merged 6 commits into
developmentfrom
feature/90-cheat-detection
Jun 24, 2026
Merged

Feature/90 cheat detection#91
tasaje1 merged 6 commits into
developmentfrom
feature/90-cheat-detection

Conversation

@tasaje1

@tasaje1 tasaje1 commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Context

Adds frontend support for cheat detection and cheat exposure during operative gameplay.

Description

Implemented the frontend WebSocket flow and UI action for exposing cheats. Operatives can trigger cheat detection through the existing shake flow, and expose-cheat results are shown in the operative chat.

Changes in the codebase

Added expose-cheat WebSocket message DTO
Added expose-cheat send flow in GameWebSocketController
Added expose-cheat repository and ViewModel actions
Added “Expose Cheat” button to operative chat
Added mapping for expose-cheat system messages
Added frontend state for correct/wrong expose results
Hide expose-cheat button after a correct exposure
Added/updated tests for GameWebSocketController, GameRepository, GameViewModel, and ChatRepository

Changes outside the codebase

N/A

Additional information

The expose-cheat button is only shown in the operative chat during the player’s active operative phase. Correct exposure hides the button and shows a success message; wrong exposure shows a penalty message.

@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.

Wie im Backend - habe leider aktuell nicht die Möglichkeit, das zu testen, eventuell morgen. Aber grobe Fehler sind mir nicht aufgefallen, ein paar Fragen hätte ich aber (siehe Kommentare)

@@ -0,0 +1,6 @@
package com.codenames.frontend.data.model.enums

enum class CheatExposureResult {

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.

könnte das nicht auch einfach ein Boolean?

messages = chatLists,
selectedTab = selectedChatTab,
availableTabs = availableChatTabs,
canExposeCheat = isActiveOperative && isExposeCheatAvailable,

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.

also dürfen Spymaster keinen Cheat exposen?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

ja das stimmt, da gibt's beim Operatives Chat wo man selber schummeln kann einen Expose Cheater button...

@tasaje1 tasaje1 linked an issue Jun 24, 2026 that may be closed by this pull request

@XtophB XtophB 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.

Tested and works. Some crashes happen due to sockets on my end, but others have no issues with it. Might be related to my machine or network.

@tasaje1 tasaje1 merged commit 70cacfa into development Jun 24, 2026
2 checks passed
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.

Expose-Button im Frontend hinzufügen

3 participants