public int move(int d, boolean findChange) {
        if (d == 0) return moveDown(findChange);
        if (d == 1) return moveLeft(findChange);
        if (d == 2) return moveUp(findChange);
        if (d == 3) return moveRight(findChange);
        if (d > 3 || d < 0) System.err.println("Invalid move");
        return -100;
    }