public boolean isImpassable(int tile, boolean canFly, boolean canWalkThroughWalls, boolean canNotGoIndoors){
        return tile == water && !canFly
                || tile == wall && !canWalkThroughWalls
                || tile == openDoor && canNotGoIndoors
                || tile == closedDoor && canNotGoIndoors
                || tile == insideFloor && canNotGoIndoors;
    }