Minesweeper!

We're glad you came by, but you might find what you're looking for elsewhere.

TI-Basic Developer is not the site it once was. While its information on commands and other calculator features remains almost second-to-none, its forum, archives, and even hosting service, Wikidot, have been decaying for years. The calculator community would love to see what you're working on, or help you in your next coding adventure, but TI-Basic Developer is no longer the place to do it.

Instead, you should head over to Cemetech (primarily American) or TI-Planet (primarily international). Both are active, well-established forums with their own archives, chatrooms, reference material, and abundant coding tools and resources. We'll see you there, we hope.

You have not uploaded your program! Please edit the page to upload your program.

Author:

CalcNerd

Download: No Download Available
Version: 1.0
Compatibility: TI-83/84/+/SE
File Size: 983 Bytes
Genre: Arcade Graphics Platform Puzzle RPG Strategy Sports Casino Board Utility Misc
Rating:
TI|BD
DelVar [A]{8,16→dim([A]
[A]→[B]
DelVar A
Repeat A=10
  randInt(2,7→Y
  randInt(2,15→X
  If [A](Y,X)≠9:Then
    9→[A](Y,X
    A+1→A
  End
End
ClrHome
1→X:10→J
For(I,1,12
  Output(4,3,sub("MINE*SWEEPER",1,I
  X+(X≠5→X
  Output(5,6,sub("V 1.1",1,X
End
Repeat K=105
  getKey→K
  min(8,max(7,Y+(K=34)-(K=25→Y
  Output(7,7,"PLAY
  Output(8,7,"EXIT
  If Y=8:Output(Y-1,6," "
  If Y=7:Output(Y+1,6," "
  Output(Y,6,">
End
For(I,1,38
  Output(randInt(1,8),randInt(1,16),"*
End
ClrHome
If Y=8:Return
4→Y:8→X
Output(1,1," -MINE*SWEEPER- "
Output(8,5,"FLAGS:
Output(8,11,J
For(A,2,7
  Output(A,1,"I
  Output(A,16,"I
  For(B,2,15
    Output(A,B,"x
  End
End
Output(Y,X,"+
Repeat K=45 or K=1
  getKey→K
  If sum(K={24,25,26,34,45,105,23:Then
    If sum(K={24,25,26,34:Then
      Output(Y,X," "
      Y→A:X→B
      max(2,min(15,X+(K=26)-(K=24→X
      max(2,min(7,Y+(K=34)-(K=25→Y
      Output(Y,X,"+
      If [B](A,B)=2:Output(A,B,"/
      If [B](A,B)=0:Output(A,B,"x
      If [B](A,B)=1:Then
        DelVar E
        For(I,A-1,A+1
          For(H,B-1,B+1
            If [A](I,H)=9:E+1→E
          End
        End
        Output(A,B,E
      End
    End
    If (K=23)(([B](Y,X)=2)+Jnot([B](Y,X):Then
      J-1+2([B](Y,X)=2→J
      abs([B](Y,X)-2→[B](Y,X
      Output(8,11,"  "
      Output(8,11,J
    End
    If (K=105)not([B](Y,X))not([A](Y,X:1→[B](Y,X
    If (K=105)[A](Y,X)=9:1→K
  End
End
0→F
For(A,2,7
  For(B,2,15
    If [A](A,B)=9 and [B](A,B)=2:F+1→F
  End
End
ClrHome
If K=1:Disp "YOU HIT A MINE!
Disp "YOU CLEARED
If F=10:Disp "ALL
Disp F,"OF THE MINES

What the community thinks:

Add a New Comment
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Noncommercial 2.5 License.