mirror of
https://github.com/kierankihn/uno-game.git
synced 2025-12-27 02:13:18 +08:00
feat(ui): add AFTER_GAME state and restart flow in GameUI
- Introduced `AFTER_GAME` state to handle post-game logic. - Updated `GameUI` to show restart prompt when the game ends. - Modified `StartPage` and `MainWindow` to support restart behavior. - Adjusted `endGame` method to transition to `AFTER_GAME`.
This commit is contained in:
@@ -16,6 +16,7 @@ export component MainWindow inherits Window {
|
||||
|
||||
// StartPage
|
||||
in property <bool> is-ready;
|
||||
in property <bool> is-restart;
|
||||
|
||||
// GamePage
|
||||
in property <[OtherPlayer]> other-players;
|
||||
@@ -46,6 +47,7 @@ export component MainWindow inherits Window {
|
||||
}
|
||||
if root.active-page == PageType.StartPage: start-page := StartPage {
|
||||
is-ready: root.is-ready;
|
||||
is-restart: root.is-restart;
|
||||
request-start => {
|
||||
root.request-start();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user