Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Keep references to BOTH the original board and the cell you found.
  2. Get an array copy of the values in the cell.  Cell.getValueArray() makes a copy.  You can use this array to loop over.
  3. In your loop:
    1. Clear the contents of the cell.  This will mutate your original board!
    2. Set the value of the cell to the desired test value.
    3. Make a copy of the orignal board.  
    4. Solve the copy of the board -- you will need to set the current board to the copy.   Don't mess up the original board!
    5. Repeat with the next test value if no solution or quit if you find a solution.

...