bool isUntraversable(GridPoint p) { return p.x < 0 || p.y < 0 || p.x >= width || p.y >= height || p.get(grid) == GridNode.obstacle; }