ZXTape! 0Created with Ramsoft MakeTZXÕSNOOKER-EGtto5vÿê*****SNOOKER****** ê*Spectrum version* ê* G.R.Bonfield * ê* July 1983 * <ê****************** Fç1:Ú6:û d í9000(# n í8400Ð x5õ¬21,0;"SPECTRUM VERSION - G.R.BONFIELD" ‚ ò200È ƒç3:Ú7:û …ê**Instructions** ‡/õ¬0,12 ;Ù7;Ú2;"SNOOKER" Œ+õ¬2,10 ;Ù2;"INSTRUCTIONS" ‘Wõ¬4,0;Ù0;"You must try and pot the ball inas few shots as possible." ’½õ¬7,0;Ù2;"I will ask you for the angle youwish the ball to go in and you must enter an angle from 0 to 360.Remember angles are measuredin an anti-clockwise direction." “kõ:õÙ1;"I will then ask you to type in the force of the shot.You must enter a number from 1 to 20." ”:õ#0;Ù6;Ú0;" Press any key to start" • ò0 –ê*Mainline routine* ªç0:Ú5:Ù0:û ´ í8400Ð ¾ í8200 à ñsh=0 Èñov=0:í8100¤ Ò í260 Üúpd=1Ëì900„ æYúsh=8Ëõ¬20,0;"8 shots and still on the table try taking some lessons" ð ì210Ò úâ ê*User input & validation* , ñpd=0 6ñbc=-0.9€ffff @ñdg=0.97€xQë… J'î"Direction (0 - 360 anti-clk):- ";a$ T í8000@ ^úfl=0Ëì330J |ña=°a$ †"úaÈ0ÆaÇ360hËì410š  ì330J šî"Force (1 - 20):- ";a$ ¤ í8000@ ®úfl=0Ëì410š ¸ñf=°a$ Â!úfÈ1ÆfÇ20Ëì470Ö Ì ì410š Öê*Calculate velocity* ôñvy=f*²(a*0.0174533{ú9) þñvx=f*³(a*0.0174533{ú9) ê*Now hit ball* &ñsh=sh+1 0ët=1Ì1000è :ñx2=x1+vx:ñy2=y1+vy Dñov=1:í8100¤ Nê*Has it been potted* ”pú(y2È139‹Åy2Ç23)Æ(x2È243óÅx2Ç16Ž(x2-127)<8)Ëñpd=1:×.9€ffff,30:þ žWú(x2Ç8Åx2È247÷)Æ(y2È131ƒÅy2Ç31)Ëñpd=1:×.9€ffff,30:þ ¨ê*Test for rebound* ÆHúx2È247÷Ëñvx=bc*vx:ñx2=247÷-(x2-247÷):×.2~LÌÌÌ,15 ÐBúx2Ç8Ëñvx=bc*vx:ñx2=8+(8-x2):×.2~LÌÌÌ,15 ÚHúy2È139‹Ëñvy=bc*vy:ñy2=139‹-(y2-139‹):×.2~LÌÌÌ,15 äEúy2Ç23Ëñvy=bc*vy:ñy2=23+(23-y2):×.2~LÌÌÌ,15 îê*Account for drag*  ñvy=vy*dg:ñvx=vx*dg  ê*Print new ball postin* >ñx1=x2:ñy1=y2 Hñov=0:í8100¤ Mú½vx<.5ÿÿÿƽvy<.5ÿÿÿËþ Rót \þ „ê*Success routine* ¢úshÉ1Ëì960À ¬6õ¬20,0;" Alex would be proud of you. " ¶ ì980Ô Àúsh<8Ëì980Ô Ê6õ¬20,0;" AT LAST!!! " Ô;õ¬21,0;"You took ";sh;" shots congratulations" Þ ò200È è5õ¬21,0;" Press 'p' to play,'s' to stop" ò ò0 üú¦="p"Ëû:ì180´ ú¦É"s"Ëì1010ò $-õ¬12 ,5;"May you pot many blacks" .õ¬4,12 ;"GOODBYE" 8â @ê*Validation-numeric only* Yúa$=""Ëì8050r ^ën=1̱a$ h4úa$(nÌn)È"0"Æa$(nÌn)Ç"9"Ëón:ñfl=1:ì8060| r ñfl=0 |þ ¤ê**Print ball** ÂWöÞov;x1,y1+1:öÞov;x1-1,y1:öÞov;x1,y1:öÞov;x1+1,y1:öÞov;x1,y1-1 þþ ê*Draw ball - init post* &ñx1=9 +º(¥*236ì) 0ñy1=24+º(¥*115s) Nþ Ðê*Screen display* æ/õ¬1,12 ;Ù7;Ú1;"SNOOKER" éën=3Ì19Í16 î8õ¬n,0;Ú2;" " óón øën=4Ì18 ý)õÚ2;¬n,0;" ";¬n,31;" " !ón ! ën=0Ì30Í30 !ëm=3Ì18Í15 !/õÙ0;Ú2;¬m,n;"‘’";¬m+1,n;"“" !óm ! ón !**õÙ0;Ú2;¬3,15;"‘’" !4+õÙ0;Ú2;¬19,15;"“" !Rën=4Ì18 !\8õ¬n,1;Ú4;" " !fón !pþ #( ê*Graphics* #F ña$="abcde" #P ñn=0 #Z ñn=n+1 #d ún>5Ëþ #n ñb$=a$(n) #xëm=0Ì7 #‚ éc(8) #Œ ñp=m+1 #–ãc(p) #  ôÀb$+m,c(p) #ªóm #´ ì9050Z# #¾Hä255ÿ,127,63?,31,15,7,3,1 #ÈHä1,3,7,15,31,63?,127,255ÿ #ÒQä128€,192À,224à,240ð,248ø,252ü,254þ,255ÿ #ÜQä255ÿ,254þ,252ü,248ø,240ð,224à,192À,128€ #æEä0,0,16,568,568,16,0,0 `