public boolean boxContains(int row, int col, int val) {
        int boxRowOffset = (row / 3) * 3;
        int boxColOffset = (col / 3) * 3;
        for (int k = 0; k < 3; ++k) {
            for (int m = 0; m < 3; ++m) {
                if (val == board[boxRowOffset + k][boxColOffset + m].getValue()) {
                    return true;
                }
            }
        }
        return false;
    }