public void CommanderLeft(Entities.Game game, String commanderName)
{
Entities.Filters.ActiveConnection.SelectAll filter = new Entities.Filters.ActiveConnection.SelectAll();
filter.GroupName = String.Format("Game_{0}", game.GameID);
List<Entities.ActiveConnection> connections = _selectActiveConnection.Execute(filter);
Entities.GamePlayer sendToPlayer = null;
foreach (Entities.ActiveConnection connection in connections)
{
sendToPlayer = game.Players.FirstOrDefault(player => player.User.UserId == connection.User_UserId);
if (sendToPlayer != null)
{
Entities.Models.Game.Board.GameBoard model = GetGameBoardModal(connection, game);
_hub.Clients.Client(connection.ActiveConnectionID)
.CommanderLeft(model, GetGameLobbyViewModel(connection, game), commanderName, game.IsWaiting());
}
}
}