CMM2 demo programs


Author Message
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6206
Posted: 07:35am 21 May 2020      

Sudoku
This program incorporates a method of solving the puzzle which I found in the QB64 samples.
The code was very condensed which makes understanding the process difficult (for me).
It also has lots of GOTOs which I have only partially removed.

It does succeed most of the time.

MMBasic has limits on the amount of recursion you can do so the more usually solving algorithms were not available.

I could have cheated by saving a copy of the solved puzzle before starting but that’s not fair.

At any time, the ‘H’ key toggles hints on/off
‘Enter’ lets the CCM2 solve it for you.

600 lines so I ZIPed it.

sudoku.zip

Jim