So after working on the second hw assignment I decided that my game needed to be simplified quite a bit. So i kept the restaurant/food theme but switched the actual game to a “Soup Stand.” The game play will be still that of a simulation — the player will create soups by changing the amount of ingredients in a particular soup (vegetables, meat, water, seasoning) as well as the price. Each customer that purchases the soup will “review” it which will affect the soups popularity. The more popular the soup the more customers that will come, and the more willing they will be to spend more money.
Here’s the little blueprint i did to help plan the class structure:
Soup
This class represents the soup object. It’ll hold all the information of the actual soup. The user will be able to change the price, and all the ingredients. The customers will have a preference on what they like in their soup, and how much they are willing to pay. The closer the actual values are to the customers preference the more popular the soup will become (resulting in more customers).
<<Variables>>
- Price: float value
- Vegetables: int value (1-10)
- Meat: int value (1-10)
- Water: int value (1-10)
- Seasoning: int value (1-10)
- Popularity: int value (1-10)
<<Methods>>
- adjustVegetables(int change)
- adjustMeat(int change)
- adjustWater(int change)
- adjustSeasoning(int change)
- adjustPopuarity(int change)
- getPopularity()
- popularityChange()
-notify observers that there has been a change in Popularity.
Customers
This class is pretty strait forward. It’s the object to represent customers.
<<Variables>>
· spendingTendency: if they are willing to spend more money or not.
· vegetarian: Boolean
<<Methods>>
/** This basically determines if they are going to purchase a bowl of soup or not*/
Order()
- Spend Money
- Determined by how
- Don’t Spend Money
/**Every customer will “review” the soup once they’ve purchased it. This will affect the soups “popularity”*/
Review()
- Indifferent
- Like
- Dislike
Customer_Driver
This class will be the AI for creating customers (i.e. how many customers there are at one time, what the personality of the customer is, etc)
<<Methods>>
createCustomer()
- dynamically create a new customer
creator_frequency()
- observe soup popularity and determine how often to call createCustomer()
I like the blueprint, well thought off, can’t wait to see it put into action.