示例#1
0
 /// <summary>
 /// Borra un jugador de la sala.
 /// </summary>
 /// <param name="name">Jugador a borrar.</param>
 public void deletePlayer(string name)
 {
     Clients.Remove(name);
     PlayersNames.Remove(name);
     if (Match != null)
     {
         Match.PlayersDeck.Remove(name);
         if (Match.Turn == name)
         {
             Match.Turn = PlayersNames.IndexOf(name) + 1 >= PlayersNames.Count ? PlayersNames[0] : PlayersNames[PlayersNames.IndexOf(name) + 1];
         }
     }
 }
示例#2
0
 /// <summary>
 /// Avanza el turno de la sala.
 /// </summary>
 public void nextTurn()
 {
     Match.Turn = PlayersNames.IndexOf(Match.Turn) + 1 >= PlayersNames.Count ? PlayersNames[0] : PlayersNames[PlayersNames.IndexOf(Match.Turn) + 1];
 }