From 37e13c000145bbc4522947e1655c963aa6abca41 Mon Sep 17 00:00:00 2001 From: Andrio Celos Date: Sat, 1 Oct 2022 16:24:34 +1000 Subject: [PATCH] Fix 400 error when starting a new game --- TableturfBattleServer/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TableturfBattleServer/Program.cs b/TableturfBattleServer/Program.cs index 8cc7693..b34873e 100644 --- a/TableturfBattleServer/Program.cs +++ b/TableturfBattleServer/Program.cs @@ -66,7 +66,7 @@ internal class Program { var game = new Game(9, 26); game.Board[4, 4] = Space.SpecialInactive2; game.Board[4, 21] = Space.SpecialInactive1; - game.Players[0] = new(name, clientToken); + game.Players.Add(new(name, clientToken)); games.Add(game.ID, game); SetResponse(e.Response, (int) HttpStatusCode.OK, "application/json", JsonConvert.SerializeObject(new { gameID = game.ID, clientToken }));