private void mark(int ar[][], int x, int y) {
        if (prompt) {
            ar[x][y] = 1;
            if (x == y) {
                ways[6][counts[6]] = 1;
                counts[6]++;
            }
            if (Math.abs(y - x) == 2 || (x == 1 && y == 1)) {
                ways[7][counts[7]] = 1;
                counts[7]++;
            }
            ways[x][counts[x]] = 1;
            counts[x]++;

            ways[y + 3][counts[y + 3]] = 1;
            counts[y + 3]++;
        } else {
            ar[x][y] = 5;
            buttons[x][y].setIcon(new ImageIcon(getClass().getResource("/cir.png")));
            buttons[x][y].setEnabled(false);
//            System.out.println(""+x+" "+y+buttons[x][y]);
            if (x == y) {
                ways[6][counts[6]] = 5;
                counts[6]++;
            }
            if (Math.abs(y - x) == 2 || (x == 1 && y == 1)) {
                ways[7][counts[7]] = 5;
                counts[7]++;
            }
            ways[x][counts[x]] = 5;
            counts[x]++;

            ways[y + 3][counts[y + 3]] = 5;
            counts[y + 3]++;

        }
    }