Add online UI components and guard fix

Introduce Online mode UI and supporting logic, plus small UI/layout refinements and a backend guard fix.

- Add CreateOrJoinMenu component for choosing between creating or joining an online game.
- Add OnlineGame class (stub) to manage online-game connection callbacks.
- Update OnlineMode route to drive Create/Join flow and start creation state.
- Refactor GameCreationMenu and GameEndedMenu layout to center content and adjust spacing/emit names.
- Update LocalMode to use the refactored components for creating and end screens.
- Minor text tweak in LocalGame description.
- Fix GameManager guard to prevent processing player moves when the game is not in Running state (check current turn and game state before proceeding).

These changes wire up the initial online UI flow and tighten server-side validation to avoid processing moves outside a running game.
This commit is contained in:
2026-03-08 20:02:29 +01:00
committed by Jonas
parent ae12be042d
commit 357449025a
8 changed files with 155 additions and 97 deletions
+1 -1
View File
@@ -66,7 +66,7 @@ public class GameManager(IGameRepository gameRepository, IHubContext<GameHubSock
if (player == null)
return;
if(game.CurrentTurn != player.PlayerTag)
if(game.CurrentTurn != player.PlayerTag || game.State != GameState.Running)
return;
if(game.State != GameState.Running) return;