public IActionResult PostProfile(GameMaster gameMaster) { var storedGameMaster = _playerStore.Get(gameMaster.Id); gameMaster.PlayerPool = storedGameMaster.PlayerPool; _playerStore.Add(gameMaster); var url = Url.Action(nameof(GetOrCreate)); return(Created(url, gameMaster)); }
public async Task Join(string playerName, string characterName) { var player = new PlayerModel { Id = Context.ConnectionId, PlayerName = playerName, CharacterName = characterName }; PlayerStore.Add(player); await Clients.All.SendAsync("PlayersChanged", PlayerStore.GetPlayers()); }