-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRoom.cs
33 lines (29 loc) · 818 Bytes
/
Room.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CinemaTicketSystem
{
internal class Room
{
public Dictionary<int,bool> Seats { get; set; } = new();
public Movie Movie { get; set; }
public int RoomNumber { get; set; }
public Room(Movie movie, int roomNumber, int numberOfSeats)
{
CreateSeats(numberOfSeats);
Movie = movie;
RoomNumber = roomNumber;
}
void CreateSeats(int numberOFSeats)
{
for (int i = 0; i < numberOFSeats; i++)
{
Seats?.Add(i, false);
}
Console.WriteLine("Seats where created for the room...");
Thread.Sleep(1000);
}
}
}