private Row(RowNumber rowNumber, int seatsPerRow) { RowNumber = rowNumber; var seats = new List<Seat>(seatsPerRow); for (var seatNumber = 1; seatNumber <= seatsPerRow; seatNumber++) { seats.Add(Seat.CreateAvailableSeat(rowNumber, seatNumber)); } _seats = seats; }
private Row(RowNumber rowNumber, IEnumerable<Seat> seats) { RowNumber = rowNumber; _seats = new List<Seat>(seats); }
internal static Seat CreateAvailableSeat(RowNumber rowNumber, SeatNumber seatNumber) { return(new Seat(rowNumber, seatNumber, SeatStatus.Available)); }
internal static Seat CreateReservedSeat(RowNumber rowNumber, SeatNumber seatNumber) { return(new Seat(rowNumber, seatNumber, SeatStatus.Reserved)); }
private Seat(RowNumber rowNumber, SeatNumber seatNumber, SeatStatus seatStatus) { _seatStatus = seatStatus; RowNumber = rowNumber; SeatNumber = seatNumber; }