def __init__(self): self.name = 'World' Space.__init__(self) if farm_config.DEBUG_WIN: debug_console.get()._print("World created.") self.house = House(1, 1, HOUSE_GRAPHIC, self) self.ship_box = Shipbox(4, 12, SHIP_BOX_GRAPHIC, self) self.pond = Pond(GAME_WIN_SIZE_Y - 5, GAME_WIN_SIZE_X - 16, POND_GRAPHIC, self ) self.seed(Cave_Entrance, CAVE_GRAPHICS_DIR + 'entrance_external', 1) self.seed(Tree, 'GRAPHICS/tree', NUMBER_TREES) self.seed(Rock, 'GRAPHICS/rock', NUMBER_ROCKS) self.seed(Bush, 'GRAPHICS/bush', NUMBER_BUSHES) if farm_config.DEBUG_WIN: debug_console.get()._print("World populated.") self.sort_contents() if farm_config.DEBUG_WIN: debug_console.get()._print("World contents sorted.")
def __init__(self): if farm_config.DEBUG_WIN: debug_console.get()._print("Cave created.") self.name = 'Cave' Space.__init__(self) # Used only by Astar self.closed_list = [] self.seed(Room, CAVE_GRAPHICS_DIR + 'room', 5) if farm_config.DEBUG_WIN: debug_console.get()._print("Rooms seeded.") entrance = Entrance(0, 10, CAVE_GRAPHICS_DIR + 'entrance_internal', self) rooms = self.contents['Room'] self.Astar = RoomWrapper(Astar) halls = self.Astar(rooms, self.closed_list) if farm_config.DEBUG_WIN: debug_console.get()._print("%d halls found." % len(halls)) for coor in halls: Hall.create(coor[0], coor[1], CAVE_GRAPHICS_DIR + 'hall', self) if farm_config.DEBUG_WIN: debug_console.get()._print("Halls created.")
def __init__(self): self.n = 5 Space.__init__(self, 0, 4)
def __init__(self): self.n = 84 * 84 * 3 Space.__init__(self, 0, 84 * 84 * 3)