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

Method initState

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

Source from the content-addressed store, hash-verified

85 self.map.setMapGridType(x, y, c.MAP_EXIST)
86
87 def initState(self):
88 if c.CHOOSEBAR_TYPE in self.map_data:
89 self.bar_type = self.map_data[c.CHOOSEBAR_TYPE]
90 else:
91 self.bar_type = c.CHOOSEBAR_STATIC
92
93 if self.bar_type == c.CHOOSEBAR_STATIC:
94 self.initChoose()
95 else:
96 card_pool = menubar.getCardPool(self.map_data[c.CARD_POOL])
97 self.initPlay(card_pool)
98 if self.bar_type == c.CHOSSEBAR_BOWLING:
99 self.initBowlingMap()
100
101 def initChoose(self):
102 self.state = c.CHOOSE

Callers 1

startupMethod · 0.95

Calls 3

initChooseMethod · 0.95
initPlayMethod · 0.95
initBowlingMapMethod · 0.95

Tested by

no test coverage detected