A golf game. ----begin documentation---- This 82u-file was prepared by Mikael Bonnier, http://www.df.lth.se.orbin.se/~mikaelb/. ************************** * GOLF.82G for the TI-82 * ************************** ACKNOWLEDGMENT GOLF.82G is a group file containing the programs G1.82P, SHOOT.82P, and V.82P. These programs were written by Pat Milheron of the TI Graphics Team and are released to the public domain. You may copy and change these programs. INTRODUCTION G1.82P is a golf game. HOW TO PLAY GOLF Run program G1. The golf green is drawn, with the ball shown at the lefthand side of the screen (a small dot), along with the distance in yards that the ball is from the hole. Press Enter to view your options. The five options are: 1) VIEW - Press 1 to view the golf green. 2) AIM - Press 2 to aim the ball; use the up and down cursor keys to adjust the aim. 3) WIND - Press 3 to view the direction of the wind. 4) CLUB - Press 4 to choose the golf club to use; press 1-5 to choose the desired club. 5) SHOOT - Press 5 to take the shot. Hit enter and a pixel at the bottom of the screen will move toward the bar on the bottom righthand side of the screen. Hit enter again to stop the pixel from moving - the closer to the bar that the pixel stops the more power there will be behind the shot. The pixel will then start moving back toward the lefthand side of the screen. To stop the pixel, hit enter. If the pixel stops to the right of the two colons, the shot will lose power and slice right; if the pixel stops to the left of the two colons, the shot will lose power and hook left; if the pixel stops in the center of the two colons, the shot will go straight. To return to the options menu, from any screen, press the Enter key. ----begin ascii---- \START82\ \COMMENT=Program file dated 08/13/96, 17:05 \NAME=G1 \FILE=G1.82P :Lbl 0:"\(-)\16X\^2\+XVsin \@\\->\\Y1\ :FnOff :AxesOff:CoordOff:Degree:150\->\K:20*rand+3\->\W:360*rand\->\S:1\#\ 50\->\V :975-(500rand\->\I:600-(1200rand\->\J:Goto 4 :Lbl 1:55\->\\@\:0\->\T :If (int (3\^-1\\sqrt\((I-1350)\^2\+(J)\^2\))\<=\2:Goto 0 :ClrDraw:0\->\Q :Circle(1350,0,45 :Pt-On(I,J :Pt-On(1350,0 :StorePic Pic1:Goto V :Lbl 2 :ClrDraw :Menu(" OPTIONS ","VIEW",V,"AIM",A,"WIND",W,"CLUB",C,"SHOOT",S : :Lbl V :prgmV :Lbl \@\:rand :If getKey\<>\105:Goto \@\ :Goto 2 : :Lbl A :prgmV :Lbl B :Line(I,J,I+10\Delta-x\cos Q,J+10\Delta-y\sin Q) :Lbl D :rand :getKey\->\Y :If Y=105:Goto 2 :5\->\X:If Y=25:Goto E :\(-)\5\->\X:If Y\<>\34:Goto D :Lbl E :If ((Q+X)>85) or ((Q+X)<\(-)\85):Goto D :Line(I,J,I+10\Delta-x\cos Q,J+10\Delta-y\sin Q,0 :Q+X\->\Q:Goto B : : :Lbl W :prgmV :Text(57,50,"SPEED = ",round(W*.6818181818,1 :Pxl-On(30,46 :Pxl-On(30,47 :Pxl-On(30,48 :Pxl-On(31,46 :Pxl-On(31,48 :Pxl-On(32,46 :Pxl-On(32,47 :Pxl-On(32,48 :Line(Xmin+47\Delta-x\,Ymin+31\Delta-y\,(Xmin+47\Delta-x\)+10\Delta-x\c\#\ os S,Ymin+31\Delta-y\+10\Delta-y\sin S) :Goto \@\ : :Lbl S : :rand :prgmSHOOT :Lbl 4 :If I>1350:Then:1350-(I-1350)\->\I:180+S\->\S:End :I\->\Xmin:J-250\->\Ymin:J+250\->\Ymax:1400\->\Xmax :If 0>Ymax:75\->\Ymax :If 0\Ymin :Goto 1 : : :Lbl C :Menu("CHOOSE CLUB","1 WOOD",9,"3 IRON",8,"6 IRON",7,"9 IRON",6,"PUTTER\#\ ",5 :Lbl 9:130\->\K:Goto 2 :Lbl 8:120\->\K:Goto 2 :Lbl 7:100\->\K:Goto 2 :Lbl 6:85\->\K:Goto 2 :Lbl 5:55\->\K:Goto 2 : \STOP82\ \START82\ \COMMENT=Program file dated 08/13/96, 17:05 \NAME=SHOOT \FILE=SHOOT.82P :RecallPic Pic1 :Text(57,0," I : : \#\ I" :27\->\H:Pxl-On(60,H :Lbl W:If getKey\<>\105:Goto W : :Lbl V:If pxl-Test(60,H+2):Return:5*5 :Pxl-Off(60,H:2+H\->\H:Pxl-On(60,H :If getKey\<>\105:Goto V : :Text(57,H,"P" :K-((33*3)-((H-27)/2)*3)\->\V :0\->\Z:If K=55:Goto 0 :Lbl 7:If H\<=\3:Return :Pxl-On(60,H-2:\(-)\2+H\->\H:2/5/5/.2 :If getKey=105:Goto 8 :Pxl-Off(60,H:Goto 7 :Lbl 8 :Text(57,H,"H" :sin sin sin sin sin sin sin 5 : : :(H-1)/2\->\H :If (H=11) or (H=10):Goto 0 :If H>9:Goto 1 :(10-H\->\Z :Z*5+\@\\->\\@\:Goto 0 : : : :Lbl 1 :(11-H\->\Z :Z*5+\@\\->\\@\:Goto 0 : : : : :Lbl 0 :ClrDraw:RecallPic Pic1 : : :Pt-On(I,J) :Repeat (\Y1\(T)\<=\0) :[[I,J]\->\[A] :.5V{cos \@\,sin (Q+Z)\->\\L1\ :.6W{cos S,sin S\->\\L2\:If K=55:Fill(0,\L2\) :(\L1\+\L2\)\->\\L3\ : :Pt-Off(I,J :I+\L3\(1)cos (Q+Z)\->\I :J+\L3\(2)\->\J :Pt-On(I,J) :T+.5\->\T :If (K\<>\55) and (T=.5):\tan^-1\ ((J-[A](1,2))/(I-[A](1,1))\->\Q :End \STOP82\ \START82\ \COMMENT=Program file dated 08/13/96, 17:05 \NAME=V \FILE=V.82P :RecallPic Pic1 :Text(57,0,"YARDS = ",int (3\^-1\\sqrt\((I-1350)\^2\+(J)\^2\ \STOP82\ ----begin uue---- begin 644 GOLF.82G M*BI423@R*BH:"@!',3,U M,"LP/YA@`#[75C_6,C^%/^8J*4]05$E/3E,I*BLJ5DE%5RHK5BLJ04E-*BM! M*RI724Y$*BM7*RI#3%5"*BM#*RI32$]/5"HK4S\_UE8_7U8_UEL^JS_.K6\Q M,#4^UUL_US(_/]9!/U]6/]9"/YQ)*THK27`Q,&,FQ%$K2G`Q,&,GPE$1/]9$ M/ZL_K019/\Y9:C$P-3[7,C\U!%@^SEEJ,C4^UT4_L#4$6#[.66\S-#[71#_6 M13_.$!!1<%@1;#@U$3P0$%%P6!%KL#@U$3[71#^<22M**TEP,3!C)L11*TIP M,3!C)\)1*S`_47!8!%$^UT(_/S_65S]?5C^3-3