def walkable(self, tile):
     (x, y) = tup(tile)
     return True if x < w() and x >= 0 and y < h() and y >= 0 and\
                    self.v.get(num(x, y)) != TileType.WALL    and\
                    self.v.get(num(x, y)) != TileType.ROCK    and\
                    self.v.get(num(x, y)) != TileType.CLL        \
                 else False
 def walkable(self, x, y):
     return (
         True
         if x < w()
         and x >= 0
         and y < h()
         and y >= 0
         and self.v.get(num(x, y)) != TileType.WALL
         and self.v.get(num(x, y)) != TileType.ROCK
         and self.v.get(num(x, y)) != TileType.CLL
         else False
     )
 def walkable(self, x, y):
     tile = self.v.get(num(x, y))
     return 0 <= x < w() and \
         0 <= y < h() and \
         tile != TT.WALL and \
         tile != TT.ROCK and \
         tile != TT.CLL
 def walkable(self, x, y):
     tile = self.v.get(num(x, y))
     return 0 <= x < w() and \
         0 <= y < h() and \
         tile != TT.WALL and \
         tile != TT.ROCK and \
         tile != TT.CLL
    def above_water(self):
        above = set()
        y = self.m.water + 1
        
        if y >= h():
            return None

        for x in range(w()):
            t = num(x, y)
            if self.walkable(t):
                above.add(t)
        return above
    def above_water(self):
        above = set()
        y = self.m.water + 1
        
        if y >= h():
            return above

        for x in range(w()):
            t = num(x, y)
            if self.walkable(t):
                above.add(t)
        return above