Skip to content

Add Hanabi frontend#82

Merged
ICubE01 merged 5 commits into
mainfrom
feature/hanabi/impl-2
Jul 18, 2026
Merged

Add Hanabi frontend#82
ICubE01 merged 5 commits into
mainfrom
feature/hanabi/impl-2

Conversation

@ICubE01

@ICubE01 ICubE01 commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Hanabi can now be picked when creating a room, and starting it opens a dedicated game screen.
  • Clue knowledge is shown on each card, and hovering a card lists the still-possible colors and values, folding in both positive and negative clues.
  • Provides firework stacks, a discard pile sorted by color and value, a token/deck/score status bar, bonus resolution UI, and a chat sidebar.
  • Generalized RoomDetailPage so STOMP destinations and the rendered screen are chosen by game.

Frontend

Features

  • games/hanabi/HanabiPage.tsx — the full Hanabi screen: status bar, firework stacks, opponents' and own hands, hint giving, discard pile, bonus banner, end-of-game modal, and chat sidebar.
  • games/hanabi/domain/applyDelta.ts — folds the server's action deltas over the last snapshot to reconstruct the values that are never transmitted (tokens, deck size, turn, pending bonus), mirroring Hanabi.java exactly.
  • games/hanabi/domain/HanabiRule.tsHanabiRule, RainbowMode.
  • games/hanabi/dtos/HanabiDto.ts, games/hanabi/dtos/HanabiMessage.ts — mirror the backend DTOs and messages.
  • HomePage/CreateRoomModal.tsx — adds Hanabi to the game list.

Enhancement

  • RoomDetailPage.tsx — makes the Tichu-only logic game-agnostic. gameSlugOf derives the STOMP destination (/game/{slug}/...), a started room renders the screen for its game, and the rule editor branches per game.
  • games/types.ts — adds GameName.HANABI and a shared GameMessage type.

Notes

  • Card color deduction mirrors the backend's HeldCard.matches. Under the wildcard rainbow mode a single color clue cannot confirm the color, so it renders as 파랑?; two or more color clues confirm rainbow and render as 무지개.
  • The GAIN_CLUE and REPAIR_AND_CLUE bonuses are applied immediately server-side and never enter a pending state, so they are not surfaced in the bonus banner.
  • Some improvements are still outstanding (action history, animations), so the room list labels the game [Beta].

@ICubE01
ICubE01 merged commit fc3e815 into main Jul 18, 2026
2 checks passed
@ICubE01
ICubE01 deleted the feature/hanabi/impl-2 branch July 18, 2026 13:29
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.

1 participant