Ejemplo n.º 1
0
 public void RemoveSeat(SeatViewModel seat)
 {
     LeftSeats.Remove(seat);
     RightSeats.Remove(seat);
     Seats.Remove(seat);
     Trace.Assert(LeftSeats.Count + RightSeats.Count == Seats.Count);
 }
Ejemplo n.º 2
0
        public bool RemovePlayer(Player player)
        {
            Player p;

            for (int i = 0; i < Seats.Count; i++)
            {
                p = Seats[i];
                if (p != null && p.PlayerId == player.PlayerId)
                {
                    Seats.Remove(p);
                    if (Seats.Count > 1 && IsActive)
                    {
                        Logger.LogGameState();
                    }
                    if (Seats.Count == 1 && IsActive)
                    {
                        Winner = Seats[0];
                        Logger.LogEndGame(true, false);
                        State.Over = true;
                    }
                    return(true);
                }
            }
            return(false);
        }
Ejemplo n.º 3
0
        private void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            var ss = SelectedSeat;

            if (ss == null)
            {
                return;
            }

            Seats.Remove(ss);
            PublicBoardCtx.Get().DeleteObject(ss);
        }
Ejemplo n.º 4
0
 public virtual void RemoveSeat(int seat)
 {
     if (seat <= SeatsCount)
     {
         if (!Seats.Contains(seat))
         {
             Log.LogInfo("seat" + seat + " does not exist.");
         }
         else
         {
             Seats.Remove(seat);
             SnDict.Remove(seat);
             sfinxData[seat - 1] = null;
         }
     }
     else
     {
         Log.LogWarn("seat" + seat + " is Invalid.");
     }
 }
Ejemplo n.º 5
0
 public void RemoveSeat(Seat seat)
 {
     Seats.Remove(seat);
 }
Ejemplo n.º 6
0
 public void RemoveSeat(SeatViewModel seat)
 {
     Seats.Remove(seat);
     Model.Seats.Remove(seat.Model);
 }