diff --git a/Core/Models/Network/GameLobbyModels.cs b/Core/Models/Network/GameLobbyModels.cs index 461d33f..6ea2fec 100644 --- a/Core/Models/Network/GameLobbyModels.cs +++ b/Core/Models/Network/GameLobbyModels.cs @@ -26,7 +26,7 @@ public class GameConfiguration public DateTime TimeCreated { get; set; } = DateTime.UtcNow; public DateTime TimeStarted { get; set; } = DateTime.UtcNow; public DateTime ExpiresAt { get; set; } = DateTime.MaxValue; - public List PlayersInLobby { get; set; } = new List() { new SimpleUser() { Id = "1", Username = "Test1"}.ToUser(), new SimpleUser(){ Id = "2", Username = "Test2"}.ToUser() }; + public List PlayersInLobby { get; set; } = new List() { }; public Dictionary> PlayerSpecialistDecks { get; set; } = new Dictionary>(); diff --git a/Core/SubterfugeCore/Core/Game.cs b/Core/SubterfugeCore/Core/Game.cs index 6cbd131..6f0949b 100644 --- a/Core/SubterfugeCore/Core/Game.cs +++ b/Core/SubterfugeCore/Core/Game.cs @@ -52,6 +52,11 @@ public static Game Bare() private Game() { GameConfiguration = new GameConfiguration(); + GameConfiguration.PlayersInLobby = new List() + { + new SimpleUser() { Id = "1", Username = "Test1" }.ToUser(), + new SimpleUser() { Id = "2", Username = "Test1" }.ToUser(), + }; SetupGameFromConfiguration(GameConfiguration, false); } diff --git a/Core/SubterfugeCoreTest/GameTest.cs b/Core/SubterfugeCoreTest/GameTest.cs index deeb781..0f76c10 100644 --- a/Core/SubterfugeCoreTest/GameTest.cs +++ b/Core/SubterfugeCoreTest/GameTest.cs @@ -38,6 +38,7 @@ public void CanAddOutpostsToBareGame() public void GameCanLoadFromConfiguration() { GameConfiguration config = new GameConfiguration(); + config.PlayersInLobby = new List() { new SimpleUser() { Id = "1", Username = "Test" }.ToUser() }; Game game = Game.FromGameConfiguration(config); Assert.AreEqual(game.TimeMachine.GetState().GetPlayers().Count, config.PlayersInLobby.Count); } @@ -46,6 +47,7 @@ public void GameCanLoadFromConfiguration() public void GameCreatedFromConfigGeneratesMap() { GameConfiguration config = new GameConfiguration(); + config.PlayersInLobby = new List() { new SimpleUser() { Id = "1", Username = "Test" }.ToUser() }; Game game = Game.FromGameConfiguration(config); Assert.AreEqual(game.TimeMachine.GetState().GetPlayers().Count, config.PlayersInLobby.Count); Assert.IsTrue(game.TimeMachine.GetState().GetOutposts().Count > 0);