PROGRAM : MINESWPR ClrHome 0-->Q Disp "RUNNING MINESWPR" Disp "ERASE ALL" Disp "DATA STORED IN Disp "L6" Disp "" Disp "PRESS ENTER" Pause Menu("CONTINUE?","YES",Y,"NO",N) Lbl N ClrHome Disp "BYE" Stop Lbl Y 0-->Q Menu("USE",OLD MINE FIELD",T,"NEW MINE FIELD",A) Lbl T 0-->L6(92) 0-->L6(93) 0-->L6(94) ClrDraw (-15)-->J (-6)-->K 15-->L 11-->M 1-->S 1-->W 1-->Q 1-->P Goto A Lbl U W-->A 1-->U Goto 0 Lbl G If B>=2 (1+(L6(93)))-->L6(93) B-->L6(W) (0.1+(L6(W)))-->L6(W) ((0.01(D+1))+(L6(W)))-->L6(W) (1+W)-->W If W>=92 Then 1-->P 1-->W Goto 8 End Output (8,14,(93-W)) Goto U Lbl A If Q=0 Then ClrHome Disp "****************" Disp " MINESWEEPER" Disp "" Disp "BY L.C." Disp " (1997)" Disp "" Disp "****************" For(I,1,94) 0-->L6(I) End End ClrHome 1-->theta 1-->P 1-->R 1-->S 1-->A 1-->E 0-->Z 5-->U prgmRESETSG AxesOff CoordOff ClrHome Disp "INITIALIZING..." If Q=1 Goto U Goto 3 Lbl 8 (L6(93))-->L6(92) Line(J,K,L,K) (K+2.3)-->K (1+S)-->S If S<10 Goto 8 (-6)-->K 1-->S Lbl 6 Line(J,K,J,M) (J+2.3)-->J (1+S)-->S If S<15 Goto 6 Line (-15,10,15,10) Text (51,2,"2ND=QUIT") Text (57,2,"ENTER=GUESS") Text (51,39,"(-)=MARK") Text (57,50,".=UNMARK") Text (51,78,L6(92)) 4-->G 1-->H 1-->R Goto 7 Lbl 7 GetKey-->R If R=24 Then Pxl-Off(H,(G-1)) Pxl-Off(H,G) Pxl-Off(H,(G+1)) If G>=8 (G-7)-->G Pxl-On(H,(G-1)) Pxl-On(H,G) Pxl-On(H,(G+1)) End If R=25 Then Pxl-Off(H,(G-1)) Pxl-Off(H,G) Pxl-Off(H,(G+1)) If H>=7 (H-7)-->H Pxl-On(H,(G-1)) Pxl-On(H,G) Pxl-On(H,(G+1)) End If R=26 Then Pxl-Off(H,(G-1)) Pxl-Off(H,G) Pxl-Off(H,(G+1)) If G<=81 (G+7)-->G Pxl-On(H,(G-1)) Pxl-On(H,G) Pxl-On(H,(G+1)) End If R=34 Then Pxl-Off(H,(G-1)) Pxl-Off(H,G) Pxl-Off(H,(G+1)) If H<=41 (H+7)-->H Pxl-On(H,(G-1)) Pxl-On(H,G) Pxl-On(H,(G+1)) End If R=21 Then ClrHome Disp "GOODBYE" Stop End If R=105 Then 1-->R 5-->U Goto 9 End If R=104 Then 2-->U Goto 9 Lbl M If C=1 Then If ((pxl-Test(H+3,G))=0) Then Text(H,G,"+") ((L6(92))-1)-->L6(92) Text (51,78," ") Text (51,78,L6(92)) End End End If R=103 Then 3-->U Goto 9 Lbl O If C=1 Then If ((pxl-Test(H+3,G))=1) Then Text(H,G," ") ((L6(92)+1)-->L6(92) Text (51,78," ") Text(51,78,L6(92)) End End End Goto 7 Lbl 9 (G/7)-->M (H/7)-->N (iPart M)-->M (iPart N)-->N (1+M)-->M (M+(13(N)))-->A 0-->Z If U/=5 Goto 0 Goto 1 Lbl 3 If P=1 Then 2-->P ClrHome Disp "ENTER LEVEL" Disp "1 TO 90" Input V If V>=90 Then Disp "YOU IDIOT" 1-->P Pause Goto 4 End If V<=1 Then Disp "YOU MORON" 1-->P Pause Goto 4 End End 1-->L6(A) (0.1+L6(A))-->L6(A) (0.01+L6(A))-->L6(A) (1+A)-->A If A>=92 Then 1-->A 1-->P Goto 4 End Output(8,14,(183-A)) If ((183-A)<100) Then If theta = 1 Then Output(8,14," ") 0-->theta End End Goto 3 Lbl 4 A-->F ((int (rand*91))+1)-->A If A = 1 11-->A If A/=91 Then If A=F (A+1)-->A End If A=91 Then If A=F (A-1)-->A End (1+L6(A))-->L6(A) If ((int (L6(A))<=2) (1+(L6(93)))-->L6(93) (1+E)-->E If E>=V Then 0-->K 1-->N 1-->M Goto Z End Goto 4 Lbl Z For(N,1,7) For(M,1,13) (1+K)-->K Output (8,14,(91-K)) (M+(13(N-1)))-->A (int (L6(A)))-->B If B=1 Then For(I,-1,1) For(J,-1,1) (N+I)-->X (M+J)-->Y (Y+(13(X-1)))-->A If (A>=1) and (A<=91) Then If (X>=1) and (X<=7) Then If (Y>=1) and (Y<=13) Then (int (L6(A)))-->B If B>=2 Then (0.01+(L6(K)))-->L6(K) End End End End End End End End End (-15)-->J (-6)-->K 15-->L 11-->M ClrDraw Goto 8 Lbl 1 If Z=0 Goto 0 If C>=8 Then ClrHome Disp "DID YOU GUESS" Disp "THAT SQUARE" Disp "ENOUGH???" Disp "GO AWAY YOU BORE" Disp "ME." Stop End If C=1 Then If ((pxl-Test(H+3,G))=1) Then ((L6(92))+1)-->L6(92) Text(51,78,L6(92)) End ((0.1)+(L6(A))-->L6(A) If B>=2 Goto Q If B=1 Then Text(H,G,D) (1+(L6(94)))-->L6(94) If ((L6(94))>=(91-(L6(93)))) Then ClrHome Disp "CONGRATULATIONS" Disp "YOU WHOOPED UP" Stop End End End If C>=2 Then ((0.1)+(L6(A)))-->L6(A) End Goto 7 Lbl 0 1-->Z (int (L6(A)))-->B (int (10((L6(A))-B)))-->C (10((10((L6(A))-B))-C))-->D (D-1)-->D If U=5 Goto 1 If U=1 Then 5-->U Goto G End If U=2 Then 5-->U Goto M End If U=3 Then 5-->U Goto O End Stop Lbl Q Text(H,G,"*") For(I,1,91) If (int(L6(I)))>=2 Then (I/13)-->N If ((fPart N)/=0) (1+N)-->N (iPart N)-->N (int N)-->N (I-(13(N-1)))-->M (N-2)-->N (M-1)-->M ((M+(4/7)))-->M ((N+(1/7)))-->N (N+1)-->N (round ((M*7),0))-->M (round ((N*7),0))-->N Text(N,M,"*") End End For(I,1,87) Text(51,I," ") Text(57,I," ") End Text(55,60,"YOU LOSE") Text(55,2,"PRESS ENTER") Pause ClrHome Menu("TRY AGAIN?","YES",Y,"NO",N) Notes------------------------------ --Requires Program RESETSG --int, ipart, rand, round, and fpart functions are under MATH --