I've been working on this program of mine for a month or so (it's a sudoku solver, I've been testing whether or not it's feasible to solve a sudoku puzzle using a brute force method)
Anyway after a couple of weeks of digging out bugs my program works flawlessly... Except for one aspect, that is. It never really terminates? I keep seeing "Running..." at the bottom of my screen, something none of my programs have ever done before.
This one was written in java. The general layout of it is something like this:
I know for a fact that the while loop stops executing (as it should, since solved is made true eventually), but it never outputs "Done.", my laptop is really warm, and the IDE I use still says it's running. I have to force quit the program.
Anyone know what it could be? I've checked everywhere for a missing closed bracket or semicolon or anything like that. Nada.
Anyway after a couple of weeks of digging out bugs my program works flawlessly... Except for one aspect, that is. It never really terminates? I keep seeing "Running..." at the bottom of my screen, something none of my programs have ever done before.
This one was written in java. The general layout of it is something like this:
Code:
public class sudoku solver {
public static void main(String[] args) {
System.out.println("Sudoku solver V1");
System.out.println("Enter sudoku puzzle clues");
// User inputs some staff, bla bla bla
boolean puzzlesolved = false;
while (puzzlesolved == false) {
/* Code to solve
the puzzle
goes here */
if ( [TheConditionsForAValidSudokuSolution] = true) {
puzzlesolved = true;
}
}
System.out.println("Done.");
}
}
I know for a fact that the while loop stops executing (as it should, since solved is made true eventually), but it never outputs "Done.", my laptop is really warm, and the IDE I use still says it's running. I have to force quit the program.
Anyone know what it could be? I've checked everywhere for a missing closed bracket or semicolon or anything like that. Nada.