Feature/90 cheat detection#91
Conversation
|
the-only-queen-anna
left a comment
There was a problem hiding this comment.
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 { | |||
There was a problem hiding this comment.
könnte das nicht auch einfach ein Boolean?
| messages = chatLists, | ||
| selectedTab = selectedChatTab, | ||
| availableTabs = availableChatTabs, | ||
| canExposeCheat = isActiveOperative && isExposeCheatAvailable, |
There was a problem hiding this comment.
also dürfen Spymaster keinen Cheat exposen?
There was a problem hiding this comment.
ja das stimmt, da gibt's beim Operatives Chat wo man selber schummeln kann einen Expose Cheater button...
XtophB
left a comment
There was a problem hiding this comment.
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.



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.