Ejemplo n.º 1
0
        public void startWaitingForCigarIngridients(Table table)
        {
            this.table = table;

            smokerThread = new Thread(this.smokerThreadRoutine);
            smokerThread.Name = "Smoker [" + productType + "]";
            smokerThread.Start();
            View.message("Smoker [" + productType + "] started to wait for service...");
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Table table = new Table();
            Servant servant = new Servant();
            Smoker[] smokers = {
                new Smoker(Resource.TypeEnum.MATCHES),
                new Smoker(Resource.TypeEnum.TOBACCO),
                new Smoker(Resource.TypeEnum.PAPER)
            };

            SmokingRoom room = new SmokingRoom(table, servant, smokers);
            room.startSmoking();
        }
 public SmokingRoom(Table table, Servant servant, Smoker[] smokers)
 {
     this.table = table;
     this.servant = servant;
     this.smokers = smokers;
 }
Ejemplo n.º 4
0
 public void setTable(Table table)
 {
     this.table = table;
 }