TITEL: Mines NT 96 IDEA: Someone smart, maybe... PROGRAMMING: Original code by Magnus Werner. Changes and improvments by Kim Hedin. SIZE: approximately 1500 NOTE: This version is to be typed in the editor, which only exist on 9700 and upwards. The numbered comments and spaces between the labels should NOT be in the code. Prog: MINES NT 96 Defm 40 Fix 2 Mcl Range 1,127,0,63,1,0 1 -> A 100 -> S Lbl 0 " -Mines NT 96-" " " "1. Amateur" "2. Normal guy" "3. Immortal" "4. Customize" ? -> X Int X -> X 1; A little bit of securement, as X=4 => Goto 1 there is always someone trying X<1 => Goto 0 to try a "not-allowed" choice! X>4=> Goto 0 10X -> M Goto 2 Lbl 1 "Number of mines:" ? -> X Int X -> X X<1 => Goto 1 X>40 => Goto 1 X-> M Lbl 2 Plot 1,59 Plot 126,Y:Line Plot X,62:Line Plot 1,Y:Line Plot 1,59:Line Lbl 3 Plot 2,60 Plot 2+A(124/M),Y Line Plot X,61 Plot 2,Y Line Int (21Ran#)+(Int (10Ran#)/100) -> Z[A] 2; Don+t know why, but functionmem Z[A]=20.09 => Goto 5 doesnt like the editor... Z[A]=0 => Goto 5 Lbl 4 Int (A-V)=1 => Goto 5 Isz V Z[A]=Z[A-V] => Goto 6 Goto 4 Lbl 5 A=M => Goto 7 Isz A 0 -> V Goto 3 Lbl 6 0 -> V Goto 3 Lbl 7 Cls 22 -> B 11 -> C 4 -> D Lbl 8 3; You dont need the expression Plot 6B-5,1 "B=1 => Goto 9" if you are using Plot X,61 "Dsz B". Line Dsz B B>10 => Goto 8 Plot 1,6C-5 Plot 127,Y Line Dsz C B>1 => Goto 8 Plot 122,61-D Plot 126,Y Line Plot 127-D,56 Plot X,60 Line Dsz D Dsz D Goto 8 Prog "MNT96 MOVE" Prog: MNT96 MOVE 2 -> C~D Lbl 0 Plot 0,0 Prog "MNT96 CHECK" Dsz S S<0 => 0 -> S "Direction"? -> E E=0 => Prog "MNT96 POS" E=1 => Goto 1 E=2 => Goto 2 E=3 => Goto 3 E=4 => Goto 4 E=6 => Goto 6 E=7 => Goto 7 E=8 => Goto 8 E=9 => Goto 9 Goto0 Lbl 1 C=2 => Goto 0 D=56 => Goto 0 C-6 -> C D+6 -> D Goto 0 Lbl 2 D=56 => Goto 0 D+6 -> D Goto 0 Lbl 3 C=122 => Goto 0 D=56 => Goto 0 C+6 -> C D+6 -> D Goto 0 Lbl 4 C=2 => Goto 0 C-6 -> C Goto 0 Lbl 6 C=122 => Goto 0 C+6 -> C Goto 0 Lbl 7 C=2 => Goto 0 D=2 => Goto 0 C-6 -> C D-6 -> D Goto 0 Lbl 8 D=2 => Goto 0 D-6 -> D Goto 0 Lbl 9 C=122 => Goto 0 D=2 => Goto 0 C+6 -> C D-6 -> D Goto 0 Prog: MNT96 CHECK Int (C-2)/6+Int (D-2)/600 -> F 1 -> A 0 -> N F=20.09 => Goto 2 Lbl 0 Z[A] -> G G=F => Goto 1 G=F+.01 => Isz N G=F-.01 => Isz N G=F+1 => Isz N G=F-1 => Isz N G=F+1.01 => Isz N G=F-1.01 => Isz N G=F+.99 => Isz N G=F-.99 => Isz N A=M => Goto 5 Isz A Goto 0 Lbl 1 "Rest in piece(s)"_ 1 -> A 0 -> S Lbl 2 Int 6Z[A]+2 -> H 600Frac Z[A]+2 -> I Plot H+1,I Plot H+3,I Line Plot H+4,I+1 Plot X,I+3 Line Plot H+3,I+4 Plot H+1,Y Line Plot H,I+3 Plot H,I+1 Line A=M => Goto 3 Isz A Goto 2 Lbl 3 Plot 0,0_ F=20.09 => Goto 4 "Game over, sucker!" "Score:" S_ Prog "MINES NT 96" Lbl 4 "Allright!" "Score:" S_ Prog "MINES NT 96" Lbl 5 C+1 -> V D -> W Prog "NUMBERS" Plot 0,0 Prog: MNT96 POS Int (C/6)+Int (D/6)/100)_ :Prog "NUMBERS" 1 -> @ ;@ is theta. N -> r N>.1 => Int log N+1 -> @ Lbl 7 Int (10Frac (r/10@)) -> N ;"small" ten here. (10(2)=100) N=1 => Goto 1 [Shift], [log]. (I think) N=2 => Goto 2 N=3 => Goto 3 N=4 => Goto 4 N=5 => Goto 5 N=6 => Goto 5 N=7 => Goto 6 N=8 => Goto 0 N=9 => Goto 3 Lbl 0 Plot V,W Plot V+2,W:Line Plot X,W+4:Line Plot V,W+4:Line N=0 => Goto 9 Lbl 1 Plot V,W+1 Plot V+1;W:Line Plot X,W+4:Line Plot V,W+4:Line Plot V,W+4 Plot V+2,W+4:Line Goto 9 Lbl 2 Plot V,W Plot V+2,W:Line Plot X,W+2:Line Plot V,W+2:Line Plot V,W+4:Line Plot V+2,W+4:Line Goto 9 Lbl 3 Plot V,W Plot V+2,W:Line Plot X,W+4:Line Plot V,W+4:Line Plot V+2,W+2 Plot V,W+2:Line N=3 => Goto 9 Plot V,W+2:Line Plot V,W:Line Goto 9 Lbl 4 Plot V,W Plot V,W+3:Line Plot V+2,W+3:LIne Plot X,W Plot X,W+4:Line Goto 9 Lbl 5 Plot V+2,W Plot V,W:Line Plot V,W+2:Line Plot V+2,W+2:Line Plot X,W+4:Line Plot V,W+4:Line N=5 => Goto 9 Plot V,W+4 Plot V,W+2:Line Goto 9 Lbl 6 Plot V,W+1 Plot V,W:Line Plot V+2,W:Line Plot X;W+4:Line Lbl 9 @=1 => Goto 8 Dsz @ V+4 -> V Goto 7 Lbl 8 r -> N Please mail bugs or comments to; Christina.Hedin@KlinFarm.uu.se