1. Run NEWSUDOK to start a new game. Choose how many clues you want (0-81). To less is difficult, but to many can make the game impossible to solve, or the calculator can't start a game at all. That's a serious bug :-(
2. Wait.
3. Move the cursor and press EXE. You can't select a clue (with a dot beside it) or a place outside the game.
4. Type the number you want to write, or 0 to delete a number.
5. You can also type 11 to exit and watch the numbers again, or 10 to quit the game and delete all game data.
6. Continue on a game with the program ~SUDOKU~.
Note: Before playing the first time, set the value (Mat A[7,1]) to something.
-> means right arrow.
=> means the right arrow in the "jump" menu.
\= means "not equal to".
_ means the display symbol.
File name:NEWSUDOK
'VER 1.01
For 1->A To 7
ClrText
Locate 7,A,"~SUDOKU~"
60!
Next
For 1->A To 7
ClrtExt
Locate 7,A,"BY OLLE"
60!
Next
Do
ClrText
"CLUES"?->Z
LpWhile Z>81
{9,9}->Dim Mat G
Mat G->Mat H
Mat G->Mat I
Mat G->Mat J
Mat G->Mat K
For 1->N To Z
Locate 10,4,N
Do
Int 9Ran#+1->A
Int 9Ran#+1->B
Int 9Ran#+1->C
3Int ((C-1)/3)+Int ((D+2)/3)->B
LpWhile Mat H[A,C]=1 Or Mat I[A,D]=1 Or Mat J[A,B]=1 Or Mat K[C,D]\=0
A->Mat G[C,D]
1->Mat H[A,C]
1->Mat I[A,D]
1->Mat J[A,B]
A->Mat K[C,D]
Next
0->Mat A[7,1]
Prog "~SUDOKU~"
File name:~SUDOKU~"
ClrGraph
ViewWindow 1,15,1,1,10,1
CoordOff
GridOff
LabelOff
BG-None
F-Line 4,10,4,1
F-Line 7,10,7,1
F-Line 10,10,10,1
F-Line 1,7,10,7
F-Line 1,4,10,4
Text 5,90,"~SUDOKU~"
Text 15,90,"BY OLLE"
Text 25,90,"WAIT..."
For 1->C To 9
For 1->D To 9
Int 7C-5->E
Int 9D-6->F
Mat G[C,D]->A
A\=0=>Text E,F,A
Mat K[C,D]\=0=>Text E,F+3,"."
Next
Next
Text 25,90,"EXE = READY"
Text 35,90,"STROKES:"
Mat A[7,1]->N
5.5->G~H
Lbl 1
Text 35,120,N
N->Mat A[7,1]
Plot G,H_
X->G
Y->H
10-Int Y->C
Int X->D
D>9=>Goto 1
Mat K[C,D]\=0=>Goto1
Do
ClrText
"WRITE?"
"10=QUIT?"
"11=BACK"?->A
LpWhile A>11 Or A<0 Or Frac A\=0
A=10=>Goto 9
A=11=>Goto 1
3Int ((C-1)/3)+Int ((D+2)/3)->B
Mat G[C,D]->M
A=0=>Goto 2
Mat H[A,C]=1 Or Mat I[A,D]=1 Or Mat J[A,B]=1=>Goto 1
1->Mat H[A,C]
1->Mat I[A,D]
1->Mat J[A,B]
Lbl 2
If M\=0
Then 0->Mat H[M,C]
0->Mat I[M,D]
0->Mat J[M,B]
IfEnd
A->Mat G[C,D]
Int 7C-5->E
Int 9D-6->F
A\=0=>Text E,F,A
A=0=>Text E,F," "
Isz N
Goto 1
Lbl 9
[[0]]->Mat G
Mat G->Mat H
Mat G->Mat I
Mat G->Mat J
Mat G->Mat K
ClrText
"~SUDOKU~"
"BY OLLE"