def __init__(self, library_path, prompt_func=input, print_func=print): self.prompt_char = ">" self.library_path = library_path self.reset_game() self.interface = CommandLine(self, prompt_func, print_func) self.bag = Bag() self.level = None self.player = None self.player_in_room = None self.room = None for direction in ("north", "south", "east", "west"): while not self.add_direction_to_commands(direction): pass
9: ("Outpost", 3), 10: ("Outpost", 3), 11: ("Monastery", 2), 12: ("Monastery", 3), 13: ("Harbour", 4), 14: ("Harbour", 3), 15: ("Harbour", 4), 16: ("Outpost", 4), 17: ("Outpost", 3), 18: ("Harbour", 3), 19: ("Harbour", 4), 20: ("Harbour", 4), 21: ("Harbour", 4), 22: ("Harbour", 3), 23: ("Harbour", 4) } if fieldOfFame: location_pool[24] = ("Township", 4) location_pool[25] = ("Township", 3) location_pool[26] = ("Township", 4) return pool, location_pool pool, location_pool = raiders_config_menu() bag = Bag(pool) board = Board(location_pool, bag) board.report()
def __init__(self, contents, size): self.size = size self.contents = contents self.bag = Bag()
def setup_method(self, method): self.bag = Bag()