Exemplo n.º 1
0
 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);
         }
     }
 }
Exemplo n.º 2
0
 public Scavenger(IHubContext <PlayersHub> hubContext, GamePool gamePool)
 {
     _gamePool   = gamePool;
     _hubContext = hubContext;
 }