Create replay games when a match ends (win or draw) and include ReplayGameCode in the GameEnded payload; adjust deletion timing to keep the replay longer and clean up original games sooner. Update game deletion logic to only destroy non-running games and schedule immediate deletion for quick timeouts. Add optional local bot support (botPlayer2 flag) with automated random-delayed moves and a UI switch in the game creation menu; expose botPlayer2 in GameSettings and LocalMode defaults. Introduce RandomPlaceMessage utility to generate varied turn descriptions and integrate it into LocalGame and OnlineGame. Also include a minor whitespace fix in Game.cs.
Move SignalR group join into GameManager and add support for player names and improved online join flow.
- Moved Groups.AddToGroupAsync call out of GameHubSocket into GameManager (hubContext.Groups.AddToGroupAsync) so group membership is handled when adding players to a game.
- GUI: added player name input to GameJoinMenu and updated JoinGameObject to include playerName and use string gameCode.
- OnlineMode & LocalMode: constructors updated to instantiate games without passing settings; removed WaitingForOpponent state and cleaned up event bindings.
- OnlineGame: rewrote to handle onGameCreated/onGameJoined/onGameStarted/onFieldUpdated/onGameEnded/onError, added joinGame validation (expects 6-digit code), join flow (connect + join), state updates, drop forwarding to player.drop(gameId, index) and place description updates.
- LocalGame: constructor signature simplified to no-arg.
These changes centralize group management, add player identification, validate join codes, and improve game state/event handling for online play.
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.
Prevent handling disconnects for games already ended; add a disconnect() method on the SignalR connection and a LocalGame.disconnectAll() helper. Update GameEndedMenu to emit a restart event and adjust displayed messages/labels. Wire a restart() handler in LocalMode that disconnects all players then restarts the game.
Send a GameInformationDto from the GameManager when broadcasting FieldUpdated (includes players, current field, state and current turn) and move currentTurn toggle before the broadcast. Update client code (GameConnection and LocalGame) to accept GameInformationDto for FieldUpdated, rename handler to updateState and apply the full game state payload. This ensures clients receive consistent game metadata (including current turn) with each field update.
Change game field representation to jagged arrays (int[][]) for JSON/SignalR compatibility and add conversion helpers in GameManager. Make Coordinates JSON-serializable (constructor and JsonPropertyName attributes). Update GameHubSocket: validate field size, fix JoinGame parameter order/Group join, rename Place->Drop and send proper game id. Add client-side local play support: GameConnection SignalR client, LocalGame orchestration for two local players, and UI components (GameCreationMenu, Slider) plus GameSettings interface. Update LocalMode route to use the new creation UI and start local games. These changes enable reliable serialization over SignalR and a local two-player flow with a creation UI.