From: jepler@nyx.cs.du.edu (Jeff)
Subject: TI-81: Another Flag Capture program.
Organization: Nyx, Public Access Unix @ U. of Denver Math/CS dept.
Date: Sat, 10 Oct 92 18:31:45 GMT

I saw the recent post with a Flag Capture game, but couldn't try it since
it required all the memory in the calculator.  So, I have created a
similar game, but smaller... Depending how liberal you are with the 
)'s, you ought to be under 800 bytes.  I'm pretty stingy, as is the
listing below (Slightly changed -- I killed a stupid Pt-Chg animation
I used for the flag at the end.)

The game plays like this:
The grid (12x8) is drawn.  Choose a square with the crosshairs.

If you get an arrow, the flag is in that direction from you.  These only 
point in eight directions -- East means directly east, but northeast
could meen three north and two east.

If you get a bomb, you don't gain any information that turn.

If you get the flag, you win.

The symbol, along with a number (The player # -- This is meant to be played
with two people, but you can play alone and keep track of turns.) are 
displayed on the righthand portion of the screen.

The probability of a bomb is related to the distance from the flag:
In a square adjacent to the flag, there is a 100% chance, but it
falls off sharply from there.

Once you get the flag, press <CLEAR> <ENTER> to play again.

The locations of your last move and your opponent's last move are 
noted by a dot in the center of the square.

In the listing, @ means <theta> and -> means <sto>.  This is done by
hand, so it's likely there are errors.  You'll have to guess between
the negative and the minus key, but that should be obvious in context.
(I wish they hadn't made the two separate symbols, but oh well.)
The symbol <= is <2nd> <math> <6>, => is <2nd> <math> <4> and != is
<2nd> <math> <2> 
"sqrt" is the square root symbol, and ^2 is the X squared symbol.

Are there better conventions for these things? It would be nice if
we all agreed on something...

--Start Listing-- 
PrgmF:FLAG
:Int 12Rand+1->A
:Int 8Rand+1->B
:-10
:Ans->D
:Ans->E
:Ans->F
:Ans->G
:0->Xmin
:95->Xmax
:0->Xscl
:0->Ymin
:63->Ymax
:0->Yscl
:All-Off
:1->T
:Lbl 1
:ClrDraw
:0->X
:If Fpart .5T
:Goto Y
:Line(85,15,93,15
:Line(93,15,93,10
:Line(93,10,85,5
:Line(85,5,93,5
:Goto 2
:Lbl Y
:Line(85,5,85,15
:Lbl 2
:Line(X,7,X,63
:X+6->X
:If X<=72
:Goto 2
:7->X
:Lbl 3
:Line(0,X,72,X
:X+7->X
:If X<=63
:Goto 3
:Pt-On(6D-3,7E+3
:Pt-On(6F-3,7G+3
:Input
:1+Int (X/6->X
:1+Int ((Y-7)/7->Y
:D->F
:E->G
:X->D
:Y->E
:6X-6->Z
:Lbl A
:Line(Z,7Y,Z,7Y+7
:IS>(Z,6X
:Goto A
:If (X=A)(B=Y)
:Goto @
:If Rand<(.5/(sqrt((X-A)^2+(Y-B)^2)-.92
:Goto 9
:Y-B
:If Ans!=0
:-5Ans/abs Ans
:Ans->@
:X-A
:If Ans !=0
:-5Ans/abs Ans
:Ans->Z
:If Z=0
:Goto 4
:If @=0
:Goto 5
:Line(90-Z,32-@,90+Z,32+@
:Line(90+Z,32+@,90,32+@
:Line(90+Z,32+@,90+Z,32
:Lbl Z
:T+1->T
:Pause
:Goto 1
:Lbl 4
:Line(90,32-@,90,32+@
:Line(90,32+@,90-@,32
:Line(90,32+@,90+@,32
:Goto Z
:Lbl 5
:Line(90-Z,32,90+Z,32
:Line(90+Z,32,90,32-Z
:Line(90+Z,32,90,32+Z
:Goto Z
:Lbl 9
:Line(80,42,87,47
:Line(87,47,90,42
:Line(90,42,90,37
:Line(87,37,93,37
:Line(97,37,95,32
:Line(95,32,93,27
:Line(93,27,87,27
:Line(87,27,85,32
:Line(85,32,87,37
:Goto Z
:Lbl @
:Line(80,17,80,37
:Line(80,37,95,37
:Line(85,37,95,27
:Line(95,27,80,27
:Pause
:ClrHome
:Disp "Turns"
:Disp T
:Y