Exemplo n.º 1
0
            public FloorPlan(List <string> rawData)
            {
                StableSeating = false;
                maxRow        = rawData.Count - 1;
                maxCol        = rawData[0].Length - 1;
                // First generates a list of list of seats
                foreach (string row in rawData)
                {
                    List <Seat> rowList = new List <Seat>();
                    foreach (char seat in row)
                    {
                        rowList.Add(new Seat(seat));
                    }
                    Seating.Add(rowList);
                }

                // Then adds all the specific neigbours to individual seats
                for (int row = 0; row <= maxRow; row++)
                {
                    for (int col = 0; col <= maxCol; col++)
                    {
                        AddNeighboursToSeat(row, col);
                    }
                }
            }
Exemplo n.º 2
0
        public static Seating AddSeating(int roomId, string description, int capacity)
        {
            Seating newSeating = Seating.Add(roomId, description, capacity, false);

            Seatings.Add(newSeating.Id, newSeating);
            NotifySeatingChanged();
            return(newSeating);
        }