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; } }
// 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 }
public void act(Table table, EnumRoom.BreadType type) { throw new NotImplementedException(); }
public Bread(EnumRoom.BreadType type, EnumRoom.MaterialState state) : base("Bread", type, state) { }