public void RemoveSeat(SeatViewModel seat) { LeftSeats.Remove(seat); RightSeats.Remove(seat); Seats.Remove(seat); Trace.Assert(LeftSeats.Count + RightSeats.Count == Seats.Count); }
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); }
private void btnDelete_Click(object sender, RoutedEventArgs e) { var ss = SelectedSeat; if (ss == null) { return; } Seats.Remove(ss); PublicBoardCtx.Get().DeleteObject(ss); }
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."); } }
public void RemoveSeat(Seat seat) { Seats.Remove(seat); }
public void RemoveSeat(SeatViewModel seat) { Seats.Remove(seat); Model.Seats.Remove(seat.Model); }