Implement Double Trouble mode and rebrand Krelles Casino#32
Merged
Conversation
- Replace StakeDisplay with StakeAmount (default 25) + StakeUnit (default DKK) - Add DoubleTroubleEnabled setting: each blank shot doubles the current stake - Track DoubleTroubleMultiplier in engine state - Expose stakeAmount, stakeUnit, doubleTroubleEnabled, currentStake in public state - Include finalStake and stakeUnit in TriggerResult event payload
- Rename to 'Krelles Casino' throughout UI - Add pre-game settings modal on landing page (configure before lobby is created) - Russian Roulette: chambers, stake amount/unit, Double Trouble toggle - Higher or Lower: base fine, unit - Double Trouble disclaimer shows full doubling chain and max fine with odds - Lobby: updated RR settings form (stake amount + unit fields, DT toggle + disclaimer) - Lobby: finished state shows Play Again (leader resets) / waiting (non-leaders) - Game views: add Play Again button on post-game screen (navigates back to lobby) - RR GameView: live stake bar showing current stake with Double Trouble multiplier badge - Empty lobby cleanup: dissolve leader's lobbies on disconnect, filter empty from list
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant enhancements to the Russian Roulette game logic and frontend, focusing on supporting a "Double Trouble" mode with dynamic stake calculation, improving session/lobby management, and refining the user interface for both Russian Roulette and Higher or Lower games. The backend now tracks and exposes stake amounts, units, and multipliers, while the frontend displays this information clearly and provides improved post-game actions.
Russian Roulette: Double Trouble & Stake System
Added support for a "Double Trouble" mode: each blank shot doubles the stake, tracked by a new
DoubleTroubleMultiplierinRussianRouletteState. The stake amount and unit are now defined inRussianRouletteSettings, replacing the previous free-form label. These values are included in game state and action results, allowing the frontend to display the current and final stakes owed by the loser. [1] [2] [3] [4] [5] [6] [7]The frontend (
GameView.jsx,GameView.css) now shows the current stake, multiplier, and unit during gameplay and after the game ends. The UI clearly indicates the amount owed by the loser and highlights the Double Trouble multiplier when active. [1] [2] [3] [4] [5]Session & Lobby Management Improvements
Added lobby reset functionality: the session leader can reset a game back to the lobby state, clearing non-leader readiness and engine state. Also, if a lobby leader disconnects, the lobby is dissolved and clients are notified. [1] [2]
Improved session join logic: reconnects are always allowed, even after the game has finished, but new joins are only permitted in the lobby state. Open lobbies now only include sessions with at least one player. [1] [2]
Frontend UI/UX Enhancements
Both Russian Roulette and Higher or Lower game views now provide prominent "Play Again" and "Leave" buttons after a game ends, with improved layout and styling for post-game actions. [1] [2] [3] [4] [5]
Updated navigation bar and button labels for clarity ("Krelles Casino", "← Leave").
Dependency and Package Updates
package-lock.jsonto properly link the local@platform/ui-librarypackage. [1] [2]