internal static SeatsList GenerateEmptySeats(int MaxNumberPlayers) { var result = new SeatsList(); for (int i = 1; i <= MaxNumberPlayers; i++) { result.Add(new Seat(i)); } return(result); }
public Table(int maxNumberPlayers, decimal pot = 0) { if (maxNumberPlayers > MAX_NUMBER_SEATS) { throw new Exception(String.Format("MaxNumberPlayers cannont exceed {0}", MAX_NUMBER_SEATS)); } if (maxNumberPlayers < MIN_NUMBER_PLAYERS) { throw new Exception("MIN_NUMBER_PLAYERS cannot be greater than MaxNumberPlayers"); } MaxNumberPlayers = maxNumberPlayers; Pot = pot; Seats = SeatsList.GenerateEmptySeats(MaxNumberPlayers); }