MCPcopy Index your code
hub / github.com/marblexu/PythonPlantsVsZombies / isValid

Method isValid

source/component/map.py:14–18  ·  view source on GitHub ↗
(self, map_x, map_y)

Source from the content-addressed store, hash-verified

12 self.map = [[0 for x in range(self.width)] for y in range(self.height)]
13
14 def isValid(self, map_x, map_y):
15 if (map_x < 0 or map_x >= self.width or
16 map_y < 0 or map_y >= self.height):
17 return False
18 return True
19
20 def isMovable(self, map_x, map_y):
21 return (self.map[map_y][map_x] == c.MAP_EMPTY)

Callers 1

showPlantMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected