Represent a baker shop. More...
Public Member Functions | |
override void | Accept (Visitor visitor) |
Handle visitors to this class. | |
Public Member Functions inherited from Visitor_Shop | |
bool | PlaceOrder (string[] items) |
Place an order for the specified items. If the inventory is empty, replenish the inventory by visiting other shops for the missing ingredients. | |
void | PickupOrder (string[] items, List< string > itemsToBePickedUp) |
Pick up the items sold by this shop (assumes the items were ordered already). Basically, this reduces the inventory for the given items that are sold by this shop. | |
abstract void | Accept (Visitor visitor) |
The visitor will call this method on each element it wants to visit. | |
Additional Inherited Members | |
Public Attributes inherited from Visitor_Shop | |
string | Name = string.Empty |
Name of the shop. | |
string | Address = string.Empty |
Address of the shop (could be a structure but a simple string is sufficient for this example). | |
Village | Village = new Village() |
The Village that contains this shop. | |
Dictionary< string, string[]> | IngredientsForItems = new Dictionary<string, string[]>() |
Specifies the ingredients needed for each item sold by the shop. Also, the keys are what the shop sells. The ingredient list could be empty if this shop is the origin of the item used as the key. | |
Represent a baker shop.
Definition at line 375 of file Visitor_Element_Classes.cs.
|
inlinevirtual |
Handle visitors to this class.
visitor | The visitor |
Implements Visitor_Shop.
Definition at line 381 of file Visitor_Element_Classes.cs.
References Visitor.VisitBaker().