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

Method loadMap

source/state/level.py:25–30  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

23 self.initState()
24
25 def loadMap(self):
26 map_file = 'level_' + str(self.game_info[c.LEVEL_NUM]) + '.json'
27 file_path = os.path.join('source', 'data', 'map', map_file)
28 f = open(file_path)
29 self.map_data = json.load(f)
30 f.close()
31
32 def setupBackground(self):
33 img_index = self.map_data[c.BACKGROUND_TYPE]

Callers 1

startupMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected