Example #1
0
        private Hall()
        {
            List <SquareInterface> newSquareList = new List <SquareInterface>();


            newSquareList.Add((SquareInterface) new Square(1));
            newSquareList.Add((SquareInterface) new Square(2));

            MaîtreHôtel MHotel = MaîtreHôtel.maîtreHôtelInstance();

            SquareList        = newSquareList;
            MHotel.ListSquare = (List <SquareInterface>)newSquareList;
        }
Example #2
0
        static void Main(string[] args)
        {
            afficher = new Affichage();

            HallInterface salle = Hall.hallInstance();

            MHotel = MaîtreHôtel.maîtreHôtelInstance();

            CutleryDesk.cutleryDeskInstance();
            OrderDesk.orderDeskInstance();


            string rep = Console.ReadLine();


            Thread threadClient = new Thread(() => ArriverClient(rep));

            new Pause().AddThread(threadClient);
            threadClient.Start();


            Thread threadAccueilMaitreHotel = new Thread(() => AccueilMaitreHotel());

            new Pause().AddThread(threadAccueilMaitreHotel);
            threadAccueilMaitreHotel.Start();

            while (true)
            {
                char key = Console.ReadKey().KeyChar;
                if (key.Equals('w'))
                {
                    new Pause().PauseThreads();
                }
                else if (key.Equals('x'))
                {
                    new Pause().Resume();
                }
            }
        }