Santa ¹1€–÷»ÿYêSanta's Dilemma by David Nowotnik from ZX Computing December 1986 êSanta's dilemma êby David Nowotnik êOctober 1986 (ê 2êUDGs <ña=À"a" Fëi=0Ì31:ãq P ôa+i,q:ói ZMä24,60<,24,126~,60<,255ÿ,126~,255ÿ dIä24,24,24,24,24,24,60<,60< nLä10 ,10 ,14,142Ž,124|,124|,68D,68D xLä24,24,60<,90Z,189½,60<,126~,126~ ‚ç0:Ú7:Ù0:û  ì1000è ô êSubroutines þ êPrint Trees /õÙ4;¬y,x;"";Ù3;¬y+1,x;"‘":þ  êPress a Key 8õ¬21,4;Ý1;"Press any key to continue" &ú¦É""Ëì550& 0ú¦=""Ëì5600 :ñz$=¦:þ XêMerry Christmas b å650Š lëi=1Ì29 v ãa:ãb:úa=99cËòb:ì630v €×a,b:ói бä.5ÿÿÿ,0,.25~ÿÿÿ,5,99c,10 ,.25~ÿÿÿ,5,.25~ÿÿÿ,7,.25~ÿÿÿ,5,.25~ÿÿÿ,4,.5ÿÿÿ,2,99c,2,.5ÿÿÿ,2 ”×ä99c,5,.5ÿÿÿ,2,.25~ÿÿÿ,7,99c,10 ,.25~ÿÿÿ,7,.25~ÿÿÿ,9 ,.25~ÿÿÿ,7,.25~ÿÿÿ,5,.25~ÿÿÿ,4,99c,10 ,.25~ÿÿÿ,4,99c,10 ž¡ä.5ÿÿÿ,4,.25~ÿÿÿ,9 ,99c,10 ,.25~ÿÿÿ,9 ,.25~ÿÿÿ,10 ,.25~ÿÿÿ,9 ,.25~ÿÿÿ,7,.5ÿÿÿ,5,.5ÿÿÿ,2 ¨Vä.5ÿÿÿ,0,.5ÿÿÿ,2,.5ÿÿÿ,7,.5ÿÿÿ,4,.5ÿÿÿ,5 ²þ è êPrint Title òëi=1Ì502 üñy=¥*20:ñx=¥*31 %ú«(y+1,x)=60<Ëì1020ü í510þ:ói  ò100d $/õ¬5,12 ;Ù6;Ú1;"SANTA'S" . ò502 8(õ¬8,11 ;Û1;" DILEMMA " Bò100d:í600X Lò100d:ç2:û V;õ¬2,9 ;Ú1;Ù6;" Santa's Dilemma "''' `>õ" It's Christmas Eve, and Santa wants to get under way to " jBõ"deliver sackfulls of super microgames to all those lucky girls" t?õ"and boys whose parents have bought them Spectrums, QLs," ~$õ"and other micros for Christmas."' ˆCõ" But someone has left his gatesopen, and all the Reindeer have" ’Eõ"got out. You'll have to guide Santa to help him get 6 Reindeer"; œ/õ"back into the pen at the left ofthe screen." ¦ í530:û °;õ¬2,9 ;Ú1;Ù6;" Santa's Dilemma "''' ºCõ" You guide Santa by using the cursor keys (5-8). The Reindeer" Ä=õ"will move away from Santa when he stands next to them."'' ÎEõ" You have to get 6 Reindeer intothe pen as fast as possible. The"; ØEõ"number at the bottom of the screen is the number of presents"; âAõ"Santa has time to deliver. As you want to disappoint as few" ìCõ"children as possible, aim to drive the Reindeer into the pen" öõ"as quickly as you can."'' õ" Good Luck"  í530 êInitialise Variables ñsany=8:ñsanx=2 ( å5000ˆ:ém(4,2) 22ëi=1Ì4:ãm(i,1):ãm(i,2):ói <ér(8,2) F2ëi=1Ì8:ãr(i,1):ãr(i,2):ói P ñtr=0 xêSet up the screen ‚ç0:Ù0:Ú7:û Œ$Ù3:õ¬6,0;"ŒŒŒŒŒŒ" –%õ¬14,0;Ý1;"ŒŒŒŒŒŒ"  ,ëi=7Ì13 :úi=10 Ëì1460´ ªõ¬i,5;Ý1;"Š" ´ ói:Ù0 ¾ëi=1Ì502 Èñy=¥*20:ñx=¥*31 Ò/úx<10 Æ(y>3Æy<16)Ëì1480È Ü%ú«(y+1,x)=60<Ëì1480È æí510þ:ói ðëi=1Ì10 ú,ñy=1+¥*20:ñx=1+¥*29 /úx<10 Æ(y>3Æy<16)Ëì1530ú ú«(y,x)É568Ëì1530ú õ¬y,x;Ù1;"’" "ói ,õ¬8,2;Ù2;"“" 6*ô23672x\,0:ô23673y\,0 @êGo get them! J8ñb=¾23672x\+256*¾23673y\:ñp=65000èý-b Túp>60000`êËñp=60000`ê ^/õ#1;¬0,0;" Presents: ";p;" " húp<300000uËì2000Ð r êMove Santa |#í3000¸ :úz=0Ëì1600@ *ñy=sany+m(z,1):ñx=sanx+m(z,2) šú«(y,x)É568Ëì1600@ ¤7úy<0Åy>21Åx<0Åx>31Ëì1600@ ®õ¬sany,sanx;" " ¸ñsany=y:ñsanx=x Â'õ¬y,x;Ù2;"“":×.01z#× =,-5 ÌêShoo Reindeer Öëi=1Ì8 à*ñy=sany+r(i,1):ñx=sanx+r(i,2) êú«(y,x)É579Ëì1800 ï7úy<1Åy>20Åx<1Åx>30Ëì1800 ô7ú«(y+r(i,1),x+r(i,2))É568Ëì1800 þIõ¬y,x;" ";¬y+r(i,1),x+r(i,2);Ù1;"’":×.01z#× =,5 ói *ú«(10 ,5)É579Ëì1600@ ñtr=tr+1 &ëi=1Ì5 0:×.15~™™™,-5:×.15~™™™,0:×.15~™™™,5 :ói Dõ¬10 ,5;" " N"õ¬6+tr,0;Ù1;"’" Xútr<6Ëì1600@ b!ò100d:í600X:ò200È l ç2:û vGõ¬4,8;"Santa can deliver ";¬6,9 ;p;" presents." €õ¬10 ,0; Š=úp<40000@œËõ"You disappointed many children":ì1980¼ ”^úp<55000ØÖËõ"Not too bad, but Santa will haveto miss quite a lot of children":ì1980¼ ž@õ"Well done; there won't be too many disappointments tonight" ¼ò100d:í600X Æ ì2060  Ð ëi=20Ì-10 Í-.5ÿÿÿ Ú×.05|LÌÌÌ,i:ói äû îMõ¬4,0;"Oh dear! You've failed to catch enough Reindeer in time." øSõ¬9 ,0;"How can you ever forgive your- self for all the broken hearts" õ"you have caused!"  ò500ô:÷ â ¸ñz$=¦:ñz=0  úz$=""Ëþ Ìñz=¯z$ Ö'úz>513Æz<579Ëñz=z-524:þ àúz=8Ëñz=1:þ êúz=9 Ëñz=4:þ ôúz=10 Ëñz=2:þ þúz=11 Ëñz=3:þ  ñz=0:þ ˆCä0,-1,1,0,-1,0,0,1 ’‡ä-1,0,-1,-1,1,0,1,1,-1,1,1,-1,0,1,0,-1 élaÿÿÿbZ 8