Beispiel #1
0
 public void BroadcastShape(object state)
 {
     foreach (Game game in GameCollection.All())
     {
         if (game.NextStage())
         {
             string player = game.GetPlayerForMove();
             if (player != null)
             {
                 _hubContext.Clients.Group(game.Id).playerFire(player);
                 continue;
             }
         }
         else
         {
             if (game.GetPlayerForMove() != null)
             {
                 var move = game.GetPlayerMove();
                 if (move != null)
                 {
                     _hubContext.Clients.Group(game.Id).playerMove(move.Item1, move.Item2, move.Item3);
                 }
             }
         }
     }
 }