Add bot play, replay creation, and move phrases

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.
This commit is contained in:
Jonas
2026-03-12 22:15:12 +01:00
parent 4826760d73
commit 0e4fb5d828
8 changed files with 151 additions and 12 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ public class Game(Coordinates gFs, SixDigitInt gameCode)
public int CurrentTurn { get; set; } = 1;
public GameState State { get; private set; } = GameState.Lobby;
public GameField Field { get; } = new(gFs);
public bool AddPlayer(Player player)
{
if(Players.Count >= 2)