public boolean canGoAtDirection(Direction direction, Location from) {
        switch (direction) {
            case UP:
                return isWalkablePath(from.getX(), from.getY() - 1);
            case DOWN:
                return isWalkablePath(from.getX(), from.getY() + 1);
            case LEFT:
                return isWalkablePath(from.getX() - 1, from.getY());
            case RIGHT:
                return isWalkablePath(from.getX() + 1, from.getY());
            default:
                return isWalkablePath(from.getX(), from.getY() - 1);
        }
    }