def __init__(self, name, description, greetings, region, numItems, quality): """ Initializes shop. @param name: The name of the shop. @param description: The description of the shop. @param greetings: The greetings the user gets as he enters a shop. @param region: The region the shop is in. @param numItems: The number of items that can be bought at the shop. @param quality: The quality of the items that may be bought at shop. Ranges from 1-20. """ Building.__init__(self, name, description, greetings) #Create items attributes and generate items objects self._region = region self._numItems = numItems self._quality = quality self._items = factories.shop_factory.getItems(region, numItems, quality) #Sort items sortItems(self._items)
def __init__(self, name, description, greetings, cost): """ Initializes inn object. @param name: The name of the inn. @param description: A description of the inn. @param greetings: The greetings the user gets as he enters the inn. @param cost: The cost of using the inn. """ Building.__init__(self, name, description, greetings) self._cost = cost
def __init__(self, name, description, greetings, talk = None): """ Initializes square object. @param name: The name of the square. @param description: A description of the square. @param greetings: The greetings the user gets as he enters a square. @param talk: A dictionary of people names and strings that are returned if a player talks in square. """ Building.__init__(self, name, description, greetings) self._talk = talk
def __init__(self, name, description, greetings, numItems, quality): """ Initializes shop object. @param name: The name of the shop. @param description: A description of the shop. @param greetings: The greetings the user gets as he enters a shop. @param numItems: The number of items that can be bought at the shop. @param quality: The quality of the items that may be bought at shop. Ranges from 1-20. """ Building.__init__(self, name, description, greetings) #Create items attributes and generate items objects self._numItems = numItems self._quality = quality self._items = factories.shop_factory.getItems(numItems, quality)
def __init__(self, name, description, greetings, talk = None, items = None): """ Initializes square object. @param name: The name of the square. @param description: A description of the square. @param greetings: The greetings the user gets as he enters a square. @param talk: A dictionary of names-responses used for dialogue. @param items: Items that the player may receive for talking to people. """ Building.__init__(self, name, description, greetings) self._talk = talk self._items = items