public void ExcludeMySelfFromAnyGame(GamePool gamePool) { foreach (Game g in gamePool.Games.Values.ToList()) { if (g.Players.TryGetValue(this.Guid, out Player p)) { g.Players.Remove(p.Guid); Log.Information("Player {name} removed his self from game {name}", p.Name, g.Name); } } }
public Scavenger(IHubContext <PlayersHub> hubContext, GamePool gamePool) { _gamePool = gamePool; _hubContext = hubContext; }