MCPcopy Create free account
hub / github.com/marblexu/PythonPlantsVsZombies / startup

Method startup

source/state/level.py:14–23  ·  view source on GitHub ↗
(self, current_time, persist)

Source from the content-addressed store, hash-verified

12 tool.State.__init__(self)
13
14 def startup(self, current_time, persist):
15 self.game_info = persist
16 self.persist = self.game_info
17 self.game_info[c.CURRENT_TIME] = current_time
18 self.map_y_len = c.GRID_Y_LEN
19 self.map = map.Map(c.GRID_X_LEN, self.map_y_len)
20
21 self.loadMap()
22 self.setupBackground()
23 self.initState()
24
25 def loadMap(self):
26 map_file = 'level_' + str(self.game_info[c.LEVEL_NUM]) + '.json'

Callers

nothing calls this directly

Calls 3

loadMapMethod · 0.95
setupBackgroundMethod · 0.95
initStateMethod · 0.95

Tested by

no test coverage detected