Ejemplo n.º 1
0
        public void Action(String choice, Table table, Waiter waiter = null, EnumRoom.BreadType breadType = EnumRoom.BreadType.White, EnumRoom.JugType jugType = EnumRoom.JugType.Tap)
        {
            switch (choice)
            {
            case "BringBread":
                BringBread bringBread = (BringBread)this.mapActions["BringBread"];
                bringBread.act(table, breadType);
                break;

            case "BringJug":
                BringJug bringJug = (BringJug)this.mapActions["BringJug"];
                bringJug.act(table, jugType);
                break;

            /* case "Serve":
             *   //this.mapActions["Serve"].act();
             *   break; */
            case "CleanTable":
                CleanTable cleanTable = (CleanTable)this.mapActions["CleanTable"];
                cleanTable.act(table, waiter);
                break;

            default:
                break;
            }
        }
Ejemplo n.º 2
0
        // TODO : Need to take care of the DateBase and of the thread lock
        public void act(Table table, EnumRoom.BreadType type = EnumRoom.BreadType.White) // Bring bread
        {
            Bread bread = initRoomModel.breadList[0];                                    //Fetch a bread

            table.breadList.Add(bread);                                                  // Add the bread to the table
            initRoomModel.breadList.RemoveAt(0);                                         //Remove the bread from stock
        }
Ejemplo n.º 3
0
 public void act(Table table, EnumRoom.BreadType type)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 4
0
 public Bread(EnumRoom.BreadType type, EnumRoom.MaterialState state) : base("Bread", type, state)
 {
 }