本文整理汇总了Python中the_tale.game.names.generator函数的典型用法代码示例。如果您正苦于以下问题:Python generator函数的具体用法?Python generator怎么用?Python generator使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了generator函数的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
def setUp(self):
super(RepairBuildingTests, self).setUp()
self.place_1, self.place_2, self.place_3 = create_test_map()
self.account_1 = self.accounts_factory.create_account()
self.account_2 = self.accounts_factory.create_account(is_fast=True)
self.storage = LogicStorage()
self.storage.load_account_data(self.account_1)
self.storage.load_account_data(self.account_2)
self.hero = self.storage.accounts_to_heroes[self.account_1.id]
self.card = self.CARD()
environment.deinitialize()
environment.initialize()
self.highlevel = environment.workers.highlevel
self.highlevel.process_initialize(0, "highlevel")
self.building_1 = BuildingPrototype.create(
person=self.place_1.persons[0], utg_name=names.generator().get_test_name("building-1-name")
)
self.building_2 = BuildingPrototype.create(
person=self.place_2.persons[0], utg_name=names.generator().get_test_name("building-1-name")
)
self.building_1.amortize(c.TURNS_IN_HOUR * 24)
self.building_2.amortize(c.TURNS_IN_HOUR * 24)