I finally managed to have time to get this program typed up. This is a version of minesweeper that I made for the TI-83 series calculators.

In designing this game, I put a lot of effort into making it look nice, & I think my efforts paid off. Let me know if you have any suggestions. I am aware that there are occasional bugs in this game, and the floodfill algorithm requires MAJOR optimizations. That is something I will work on. Anyway, please try it out. I hope you like it.

Also, note that generating a new field takes from ~5-30 seconds, I believe, but it could be a little loger than this. This all depends on how many mines you wish to generate. Also, as with most programs, it runs much more quickly and smoothly on the TI-84+ than it does on the TI-83+.

Another thing: the last line of code is a reference to a program I use at the end of virtually all of my programs. All it does is perform "DelVar" on all real variables.

So, here is my code:

```
:AxesOff
:GridOff
:FnOff
:PlotsOff
:7/6 -> Xmin
:101/6 -> Xmax
:-9.25 -> Ymin
:-1.5 -> Ymax
:ClrDraw
:Text(-1,1,1,"MINESWEEPER
:Text(8,1,"WOLFGANG
:Text(18,1,"SELECT TILE: ARROWS
:Text(26,1,"FLAG TILE: 2ND
:Text(34,1,"CHECK TILE: ENTER
:Text(42,1,"QUIT: CLEAR
:Text(57,62,"HIT ENTER
:Pause
:Lbl M
:ClrDraw
:SetUpEditor
:Menu("MINESWEEPER","START",1,"QUIT",Q
:Lbl 1
:For(A,-8.5,Ymax
:Horizontal A
:End
:For(A,1.5,16.5
:Vertical A
:End
:Vertical Xmin
:Vertical 4/3
:Vertical 50/3
:Vertical Xmax
:For(A,-9.25,-69/8,1/8
:Line(Xmin,A,Xmax,A,0
:End
:DelVar [A]{9,17} -> dim([A]
:9 -> A:-5 -> B
:Repeat C≥5 and C≤30 and not(fPart(C
:ClrHome
:Input "NUMBER OF MINES ",C //1 Space after MINES
:End
:C -> D
:DelVar EClrList L1,L2
:C -> dim(L1
:L1 -> L2
:For(F,1,C
:Repeat not(sum(PV=L1 and FV=L2
:randInt(2,8 -> PV
:randInt(2,16 -> FV
:End
:PV -> L1(F
:FV -> L2(F
:-1 -> [A](PV,FV
:End
:Output(3,2,"I%
:For(G,2,8
:G-1
:Output(3,1,iPart(100Ans/8
:For(H,2,16
:[A](G,H
:Ans+not(Ans)sum((1≥abs(G-L1) and 1≥abs(H-L2 -> [A](G,H
:End
:End
:Text(57,0,"MINES ",C //1 space after MINES
:Text(57,40,"FLAGS
:Repeat E=C or E<0 or K=45
:C-D
:If Ans>9
:Text(57,63,Ans
:If Ans≤9
:Text(57,63,0,Ans
:Repeat max(K={105,21,45
:Pt-Change(A,B
:Repeat Ans
:getKey -> K
:End
:Pt-Change(A,B
:A+(K=26 and A<16)-(K=24 and A>2 -> A
:B+(K=25 and B<-2)-(K=34 and B>-8 -> B
:End
:If K=105 and not(pxl-Test(-8B-13,6A-8:Then
:[A](-B,A
:If 0≤Ans:Then
:int(Ans -> F
:If Ans:Then
:Text(-8B-15,6A-8,Ans
:Else
:DelVar F{A -> L1:{B -> L2
:Repeat F=dim(L1
:F+1 -> F
:L1(Ans
:If not([A](-L2(F),Ans:Then
:Ans -> G:Ans -> H
:While Ans>2 and not([A](-L2(F),Ans-1
:Ans-1
:End
:Ans -> G:Ans-1
:If G>2
:Text(-8L2(F)-15,6Ans-8,int([A](-L2(F),Ans
:H
:While Ans<16 and not([A](-L2(F),Ans+1
:Ans+1
:End
:Ans -> H:Ans+1
:If H<16
:Text(-8L2(F)-15,6Ans-8,int([A](-L2(F),Ans
:For(I,G,H
:For(J,-1/3,2/3,1/6
:Line(I+J,L2(F)-3/8,I+J,3/8+L2(F
:End
:If 8>-L2(F
:Then
:int([A](1-L2(F),I
:If not(Ans
:Then
:L2(F)-1 -> L2(1+dim(L2
:I -> L1(1+dim(L1
:Else
:Text(-8L2(F)-7,6I-8,Ans
:End
:End
:If 2<-L2(F
:Then
:int([A](-L2(F)-1,I
:If not(Ans
:Then
:1+L2(F -> L2(1+dim(L2
:I -> L1(1+dim(L1
:Else
:Text(-8L2(F)-23,6I-8,Ans
:End
:End
:.01 -> [A](-L2(F),I
:End
:End
:End
:End
:Else
:-1 -> E
:End
:End
:If K=21 and not(pxl-Test(-8B-12,6A-7:Then
:int(abs(10fPart([A](-B,A -> F
:If Ans or D>0 and not(Ans
:Then
:D+(Ans=1)-not(Ans -> D
:[A](-B,A
:(0≤Ans)-(0>Ans
:Ansnot(F)/10+int([A](-B,A -> [A](-B,A
:If F
:Pt-Off(A,B,2
:If not(F
:Pt-On(A,B,2
:If -1≥[A](-B,A
:E-F+not(F -> E
:End
:End
:End
:If K=45:Goto Q
:If E<0:Then
:Text(57,0,"GAME OVER
:For(A,3,87,6
:For(B,1,56,8
:Text(B,A," X //1 Space before the X
:End
:End
:Else
:Text(57,0,"YOU WIN"," " //5 Spaces
:End
:Repeat getKey
:End
:Lbl Q
:DelVar [A]
:ClrList L1,L2
:ZStandard
:AxesOn
:prgmθDELVAR
```

All occurances of PV, FV, and I% are references to the finance variables.

—Wolfgang