Esempio n. 1
0
 def load(self, savegame, players, is_ai_test, is_map):
     # keep a reference on the savegame, so we can cleanup in `end`
     self.savegame = savegame
     self.started_from_map = is_map
     if is_ai_test:
         # enable trader, pirate and natural resources in AI tests.
         options = StartGameOptions.create_ai_test(savegame, players)
     else:
         # disable the above in usual game tests for simplicity.
         options = StartGameOptions.create_game_test(savegame, players)
         options.is_map = is_map
     super(SPTestSession, self).load(options)
Esempio n. 2
0
	def load(self, savegame, players, is_ai_test, is_map):
		# keep a reference on the savegame, so we can cleanup in `end`
		self.savegame = savegame
		self.started_from_map = is_map
		if is_ai_test:
			# enable trader, pirate and natural resources in AI tests.
			options = StartGameOptions.create_ai_test(savegame, players)
		else:
			# disable the above in usual game tests for simplicity.
			options = StartGameOptions.create_game_test(savegame, players)
			options.is_map = is_map
		super(SPTestSession, self).load(options)