99 goto 8500 100 let ox=x:let oy=y #110 let i$=inkey$:if i$<="4" and i$>="1" then let i=val i$:plot e(i),d(i):print at m(i),n(i);over 1;paper 2;" " 110 let i$=inkey$:if i$>q$ or i$<"1" then let t1=t1-1:goto 200 114 let i=val i$ 115 print over 1;ink 2;at m(i),n(i);" " 120 let deltax=x-e(i):let deltay=y-d(i) 130 let num=(abs deltax+abs deltay) 140 let dx=dx-(deltax/num)/f(i) 150 let dy=dy-(deltay/num)/f(i) 190 print over 1;ink g(i);at m(i),n(i);" " 195 let t1=t1-3 200 if t1<0 then let t1=10:let t2=t2-1:print #0;at 1,27;t2;" ":if t2=0 then goto 770 205 let x=x+dx:let y=y+dy 210 if x<0 or y<0 or x>255 or y>175 then goto 600 220 plot ink 8;paper 8;inverse 1;ox,oy 225 if point (x,y) then goto 510 230 plot ink 8;paper 8;x,y 500 goto 100 # hit summat 510 let by=int (( (x+.5))/8) 520 let bx=21-int (( (y+.5))/8) 530 if attr (bx,by)=76 then print at bx,by;ink 7;" ":let score=score+1:beep .01,20:print #0;at 1,score*2-1;ink 4;"\a":if score=toget then let level=level+1:gosub 8700:goto 1010 550 print at bx,by;flash 1;ink 2;paper 5;over 1;" ":plot over 1;ink8;paper 8;x,y 560 goto 750 #off the play field 600 print at (21-int (( (oy+.5))/8)),int (( (ox+.5))/8);ink 2;paper 5;over 1;flash 1;" " 610 goto 750 #died 750 beep .1,-14:beep .1,-13:beep .1,-17 755 print #0;paper 2;ink7;at 0,0;" OOPSIE DAISY, BETTER TRY AGAIN ";ink 1;paper 0;"0-QUIT, OTHERS RESTART" 756 if inkey$<>"" then goto 756 757 let i$=inkey$:if i$="" then goto 757 758 if i$="0" then goto 8523 759 let deaths=deaths+1 #jump to redraw screen 760 goto 1010 #770 out of time 770 print #0;at 1,25;" ";flash 1;ink2;" TIME " 780 goto 750 #star here? 1000 let level=1 #here for new level 1010 if level=maxlev then goto 8800 1100 gosub 6000 1270 let score=0 1300 let t1=10:let t2=timer 2000 goto 100 #jump here at start #load a level #5000 gosub 9000 5020 goto 1000 #called with level variable 6000 randomize:restore 6000+100*level: paper 1:ink 5:border 0:bright 1:cls 6004 read t$,x,timer:print #0;at 0,(16-.5*len t$);ink 7;bright 1;t$;at 1,8;ink 1;"Harbour Number ";LEVEL 6005 let q$=str$(x) 6006 read ox:if ox=0 then goto 6010 6007 for i=1 to ox:read ox,oy,deltax,deltay 6008 for y=1 to deltax:print at ox-1+y,oy;ink 0;paper 2;"\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::"(1 to deltay):next y:next i 6010 for i=1 to x:read m(i),n(i),f(i):next i 6015 for i=1 to x:let e(i)=8*n(i)+3:let d(i)=172-m(i)*8:next i 6017 read ox,oy,dx,dy:plot ink 1;ox,oy:draw ink 1;dx*24,dy*24 6020 for i=1 to x:print ink 7;at m(i)-1,n(i);"\i";at m(i),n(i)-1;"\j \k";at m(i)+1,n(i);"\l"\ :let g(i)=5.5-(sgn f(i))/2\ :print ;bright 0;ink g(i);at m(i),n(i);chr$(144+i):next i 6025 read x:if x=0 then goto 6035 6030 for i=1 to x:read x,y:print at x,y;ink 2;"\a":next i 6035 read x:let toget=x:if x=0 then goto 6045 6040 for i=1 to x:read x,y:print at x,y;ink 4;"\a":next i 6045 read x:if x=0 then goto 6065 #temporary variables 6050 read bx,by,deltax,deltay:for i=1 to x 6055 let x=bx+int (rnd*deltax):let y=by+int (rnd*deltay):if attr (x,y)<>(13+64) then goto 6055 6060 print at x,y;ink 2;"\a":next i 6065 read x:let toget=toget+x:if x=0 then goto 6081 #temporary variables 6070 read bx,by,deltax,deltay:for i=1 to x 6075 let x=bx+int (rnd *deltax):let y=by+int (rnd *deltay):if attr (x,y)<>(13+64) then goto 6075 6080 print at x,y;ink 4;"\a":next i 6081 print #1;at 1,0;" " 6082 for i=1 to val(q$):print #0;at 1,16+i;ink (5.5-(sgn f(i))/2\);chr$(159-abs(f(i))):next i 6085 for i=1 to toget:print #0;at 1,i*2-1;ink 1;"\a":beep 0.1,i*3:next i 6086 print #1;at 1,27;ink 2;timer 6087 for i=1 to val q$:print ink g(i);at m(i),n(i);chr$(144+i):next i 6090 let x=ox:let y=oy:plot ink 1;over 1;ox,oy:draw ink 5;over 1;dx*24,dy*24 6091 for i=1 to 6 6092 circle over 1;x,y,3:plot over 1;x,y:draw over 1;dx*5,dy*5:if i/2<>int (i/2) then beep .1,1 6094 next i 6096 print #1;at 1,27;ink 7;timer #6095 print #0;over 1;at 0,(16-.5*len t$);ink 5;bright 1;t$ 6097 return # Name,Number of magnets,timer 6100 data "Easy Does It",6,130 # Blocks, number of - then coordinates, and 6101 data 0 # Magnet Coordinates, and intensity: 3 = normal, 2= more intense, 1=even more. negative numbers "push" rather than pull. 6102 data\ 1,15,3,\ 6,1,3,\ 15,1,3,\ 20,15,3,\ 15,30,3,\ 6,30,3 #start coordinates (x,y), direction (dx,dy) 6103 data 240,150,-2,-2 #fixed baddies; number, coord pairs (x,y) 6104 data 0 #fixed collectibles; number, coord pairs (x,y) 6105 data 0 #random baddies; number, coord limit x,y (top left) size (x-y) 6106 data 7,4,4,14,24 #random collectibles; number, coord limit x,y (top left) size (x-y) 6107 data 3,8,8,6,14 # Number of magnets 6200 data "Repel Boarders",4,130 # Blocks, number of - then coordinates, and 6201 data 0 # Coordinates, and intensity: 3 = normal, 2= more intense, 1=even more. negative numbers "push" rather than pull. 6202 data\ 1,1,-3,\ 1,30,-3,\ 20,1,-3,\ 20,30,-3 #start coordinates (x,y), direction (dx,dy) 6203 data 180,130,-1,-1 #fixed baddies; number, coord pairs (x,y) 6204 data 0 #fixed collectibles; number, coord pairs (x,y) 6205 data 0 #random baddies; number, coord limit x,y (top left) size (x-y) 6206 data 10,1,1,21,31:rem screen-1 screen #random collectibles; number, coord limit x,y (top left) size (x-y) 6207 data 5,1,1,21,31 # Number of magnets 6300 data "Don't Push Me!",5,130 # Blocks, number of - then coordinates, and 6301 data 0 # Coordinates, and intensity: 3 = normal, 2= more intense, 1=even more. negative numbers "push" rather than pull. 6302 data\ 3,3,-3,\ 3,28,-3,\ 18,3,-3,\ 18,28,-3,\ 10,15,+2 #start coordinates (x,y), direction (dx,dy) 6303 data 100,100,2,1 #fixed baddies; number, coord pairs (x,y) 6304 data 0 #fixed collectibles; number, coord pairs (x,y) 6305 data 0 #random baddies; number, coord limit x,y (top left) size (x-y) (0,0,22,32=whole screen) 6306 data 10,0,0,22,32 #random collectibles; number, coord limit x,y (top left) size (x-y) 6307 data 5,0,0,22,32 # Name,Number of magnets,timer 6400 data "Five Fingered Salute",5,130 # Blocks, number of - then coordinates, and 6401 data 2,9,0,4,10,9,22,4,10 # Magnet Coordinates, and intensity: 3 = normal, 2= more intense, 1=even more. negative numbers "push" rather than pull. 6402 data\ 3,3,3,\ 3,28,3,\ 18,3,3,\ 18,28,3,\ 10,16,-2 #start coordinates (x,y), direction (dx,dy) 6403 data 100,100,1,1 #fixed baddies; number, coord pairs (x,y) 6404 data 0 #fixed collectibles; number, coord pairs (x,y) 6405 data 0 #random baddies; number, coord limit x,y (top left) size (x-y) 6406 data 10,0,0,22,32:rem whole screen #random collectibles; number, coord limit x,y (top left) size (x-y) 6407 data 5,0,0,22,32 # Name,Number of magnets,timer 6500 data "Tug Pusher",6,130 # Blocks, number of - then coordinates, and 6501 data 0 # Magnet Coordinates, and intensity: 3 = normal, 2= more intense, 1=even more. negative numbers "push" rather than pull. 6502 data\ 1,15,-3,\ 6,1,-3,\ 15,1,-3,\ 20,15,-3,\ 15,30,-3,\ 6,30,-3 #start coordinates (x,y), direction (dx,dy) 6503 data 10,10,2,2 #fixed baddies; number, coord pairs (x,y) 6504 data 0 #fixed collectibles; number, coord pairs (x,y) 6505 data 0 #random baddies; number, coord limit x,y (top left) size (x-y) 6506 data 8,4,4,14,24 #random collectibles; number, coord limit x,y (top left) size (x-y) 6507 data 4,8,8,6,14 # Number of magnets 6600 data "Slingshot",4,190 # Blocks, number of - then coordinates, and 6601 data 0 # Coordinates, and intensity: 3 = normal, 2= more intense, 1=even more. negative numbers "push" rather than pull. 6602 data\ 6,6,3,\ 6,25,3,\ 15,6,3,\ 15,25,3 #start coordinates (x,y), direction (dx,dy) 6603 data 80,90,1,1 #fixed baddies; number, coord pairs (x,y) 6604 data 0 #fixed collectibles; number, coord pairs (x,y) 6605 data 5,2,2,2,29,19,2,19,29,10,15 #random baddies; number, coord limit x,y (top left) size (x-y) 6606 data 10,0,0,22,32 #random collectibles; number, coord limit x,y (top left) size (x-y) 6607 data 0 # Name,Number of magnets,timer 6700 data "Push it real good",3,130 # Blocks, number of - then coordinates, and 6701 data 2,7,0,10,4,7,28,10,4 # Magnet Coordinates, and intensity: 3 = normal, 2= more intense, 1=even more. negative numbers "push" rather than pull. 6702 data\ 1,1,-2,\ 1,30,-2,\ 20,16,-2 #start coordinates (x,y), direction (dx,dy) 6703 data 10,10,2,2 #fixed baddies; number, coord pairs (x,y) 6704 data 0 #fixed collectibles; number, coord pairs (x,y) 6705 data 2,4,10,4,20 #random baddies; number, coord limit x,y (top left) size (x-y) 6706 data 7,0,0,22,32 #random collectibles; number, coord limit x,y (top left) size (x-y) 6707 data 3,2,5,5,10 # Name,Number of magnets,timer 6800 data "Ebb And Flow",4,130 # Blocks, number of - then coordinates, and 6801 data 2,0,0,4,4,0,28,4,4 # Magnet Coordinates, and intensity: 3 = normal, 2= more intense, 1=even more. negative numbers "push" rather than pull. 6802 data\ 19,1,3,\ 20,3,-3,\ 19,30,3,\ 20,28,-3 #start coordinates (x,y), direction (dx,dy) 6803 data 160,160,0,-2 #fixed baddies; number, coord pairs (x,y) 6804 data 0 #fixed collectibles; number, coord pairs (x,y) 6805 data 0 #random baddies; number, coord limit x,y (top left) size (x-y) 6806 data 7,0,0,22,32 #random collectibles; number, coord limit x,y (top left) size (x-y) 6807 data 3,2,2,16,28 # Name,Number of magnets,timer 6900 data "Snookered",4,130 # Blocks, number of - then coordinates (x,y) and size (x,y) 6901 data 1,3,3,3,24 # Magnet Coordinates, and intensity: 3 = normal, 2= more intense, 1=even more. negative numbers "push" rather than pull. 6902 data\ 1,1,3,\ 20,30,3,\ 18,28,3,\ 15,5,-3 #start coordinates (x,y), direction (dx,dy) 6903 data 100,110,0,-1 #fixed baddies; number, coord pairs (x,y) 6904 data 4,9,15,10,14,10,16,11,15 #fixed collectibles; number, coord pairs (x,y) 6905 data 3,1,6,10,15,19,29 #random baddies; number, coord limit x,y (top left) size (x-y) 6906 data 0:rem whole screen #random collectibles; number, coord limit x,y (top left) size (x-y) 6907 data 0 # Name,Number of magnets,timer 7000 data "Down the Hatch",6,130 # Blocks, number of - then coordinates, and 7001 data 2,4,3,18,4,4,24,18,4 # Magnet Coordinates, and intensity: 3 = normal, 2= more intense, 1=even more. negative numbers "push" rather than pull. 7002 data\ 19,1,-2,\ 19,30,-2,\ 10,15,2,\ 13,15,-2,\ 1,1,-2,\ 1,30,-2 #start coordinates (x,y), direction (dx,dy) 7003 data 150,10,0,2 #fixed baddies; number, coord pairs (x,y) 7004 data 0 #fixed collectibles; number, coord pairs (x,y) 7005 data 2,17,1,17,30 #random baddies; number, coord limit x,y (top left) size (x-y) 7006 data 7,0,0,22,32:rem whole screen #random collectibles; number, coord limit x,y (top left) size (x-y) 7007 data 3,4,4,17,24 8500 rem start 8501 border 1:paper 1:ink 7:bright 0:cls 8510 ink 7:flash 0:cls 8511 print'"After her success in the hit TV comedy The Darling Buds Of May, the lead actress slowly became more and more passionate about environmentalism. In particular she despised the diesel powered aquatic vehicles carrying goods and persons on seas, lakes and other bodies of water." 8512 print'"She put her razor sharp brain tothe problem and devised a revol-utionary method of moving the water-borne craft without the need for polluting fossil fuels:Magnetism! She knew that by con-structing the vessels of iron, and mounted electromagnets at strategic places in a harbour, she would be able to move them around with pinpoint accuracy." 8513 gosub 9090 8514 print #0;ink 7;"And thus was created..."::pause 0 8523 cls:print at 2,4;ink 7;"PAM" 8524 ink 6:print:flash 1 8525 print " \':\''\':\ '\:'\''\: \':\''\'.\ \':\''\'.\ \:'\:'\: \.'\''\. \: \.'\''\. " 8526 print " \ :\..\ \ \:.\. \ \ :\..\.'\ \ :\..\.'\ \ \: \ \'.\..\ \ \'.\..\ " 8527 print " \ :\ \ \ \: \ \ \ :\ \'.\ \ :\ \'.\ \ \: \ \. \ \: \ \. \ \: " 8528 print " \.:\. \ \ .\:.\..\: \.:\. \.:\. \.:\. \.:\. \:.\:.\: \'.\..\' \ \'.\..\' ":ink7:print:inverse 1 8529 print " \':\''\':\ '\:'\''\: \':\''\'.\ \':\''\'.\ \.'\''\. \':\' \':\' \.'\''\. " 8530 print " \ :\..\ \ \:.\. \ \ :\..\.'\ \ :\..\.'\ \: \ \: \ :\ \ :\ \'.\..\ " 8531 print " \ :\ \ \ \: \ \ \ :\ \'.\ \ :\ \'.\ \: \ \: \ :\ \ :\ \. \ \: " 8532 print " \.:\. \ \ .\:.\..\: \.:\. \.:\. \.:\. \.:\. \'.\..\' \ '\..\.'\ \'.\..\' ":ink6:print:inverse 0 8533 print " \':\''\':\ '\:'\''\: \':\''\'.\ \':\''\'.\ \:'\:'\: \':\''\':\ \.'\''\. " 8534 print " \ :\..\ \ \:.\. \ \ :\..\.'\ \ :\..\.'\ \ \: \ \ :\..\ \ \'.\..\ " 8535 print " \ :\ \ \ \: \ \ \ :\ \'.\ \ :\ \'.\ \ \: \ \ :\ \ \ \. \ \: " 8536 print " \.:\. \ \ .\:.\..\: \.:\. \.:\. \.:\. \.:\. \:.\:.\: \.:\..\.:\ \'.\..\' " 8537 flash 0:paper 1:ink 7:bright 0 8538 print #0;at 0,3;"[1] PLAY [2] INSTRUCTIONS" 8539 let x=0:restore 9000 8540 read y:beep 0.1+(y<1)*0.15,abs (y):let x=x+1:if x=162 then let x=56:restore 9001 8550 let i$=inkey$:if i$<"1" or i$>"3" then goto 8540 8555 if i$="1" then let totalscore=0:let deaths=0:let cheat=0:goto 1000 8560 if i$="2" then goto 8600 8565 input "Skip to which level? ";level 8570 let totalscore=0:let deaths=0:let cheat=1:goto 1010 8600 cls 8610 print ink7;\ " \i \i \i \i"'\ "Use the magnets\j\b\j\c\j\d\j\e\ketc. to"''"force the vessel in the harbour"''"to collect the good things ";ink 4;"\a";ink 7;" and"''"avoid the bad things ";ink 2;"\a";ink 7;"."\ ;at 1,17;over 1;\ "\k \k \k"'\ " \l \l \l \l" 8620 print ink7;\ at 11,7;" \i"," \i";\ at 13,7;" \l"," \l" 8630 print at 9,0;'"Magnets come in two types:"''"Some PULL\j \kand some PUSH\j \k" ;at 12,10;ink 5;"\g";at 12,26;ink 6;"\h" 8640 print at 15,0;"Hold the corresponding numbers"''"to activate the magnets. Get the"''"things quickly for a high score." 8650 print #0;at 0,0;"These ";ink5;"\o\m";ink6;"\n";ink5;"\n";ink7;" are magnet strengths." 8670 pause 0:goto 8523 #competed level! Perfick! 8700 let totalscore=totalscore+t2:print #1;at 1,0;" " 8733 print ink 2;paper 0;flash 1;\ at 7,3;" \..\..\. \ .\..\..\. \..\..\. \ \..\..\..\ .\..\..\ \..\. \ .\..\ .\.. ";\ at 8,3;" \ :\ \ :\ \: \ \' \ :\ \ :\ \ :\ \ '\ '\ :\ '\ :\ \ :\ \: \ .\' ";\ at 9,3;" \ :\..\' \ \:'\' \ \ :\''\: \ \ :\''\ \ \ :\ \ :\ \ \ \:'\'.\ ";\ at 10,3;" \ :\ \ \ \: \ \. \ :\. \ :\ \ :\ \ \ .\ :\ .\ :\ \ :\ \: \ \: ";\ at 11,3;" \''\' \ \ '\''\''\' \''\' \''\' \''\' \ \ '\''\''\ \''\' \ '\''\ '\'' " 8735 if inkey$<>"" then goto 8735 8736 if inkey$="" then goto 8736 8737 return #finished all the levels #all levels complete 8800 paper 1:ink 7:border 1:bright 0:cls 8900 print ''"Points scored on finishing","all levels: ";totalscore 8910 print '"Number of retries: ";deaths 8920 print '"Penalty for retries: ";-deaths*25 8930 print '"Did you cheat: ";("Yes" and cheat=1);("No" and cheat=0) 8940 let totalscore=(not (cheat))*(totalscore-(deaths*50)) 8959 print at 14,9;"TOTAL SCORE" 8960 print at 21,0;ink 1;totalscore:let b=(len (str$(totalscore))-1) 8965 let pos=0:for a=0 to b 8970 for x=((a/2)=int(a/2))to 6 step 2 8975 for y=1 to 6 step 2 8980 let c=128+point (8*a+x+1,7-y)+2*point(8*a+x,7-y)+4*point(8*a+x+1,6-y)+8*point(8*a+x,6-y) 8985 print at 16+y/2,pos+13-(b*4.5)/2;chr$ c:next y:let pos=pos+1:next x:next a 8990 pause 0 8999 goto 8523 #based on mike oldfield's 'branacle bill' hornpipe arrangement 9000 data 13,12,-13,-1,-1,8,6,5,8,13,12,-13,15,14,-15,-3,-3\ ,10,8,7,10,15,14,-15,17,18,20,18,17,15,18,17,15,13\ ,17,15,13,11,15,13,11,10,13,11,10,8,11,10,8,6,5,4,3,2,-1,1,2 #bb loop point (56 notes in) 9001 data -6,-6,6,8,10,11,-13,-13,-13,15,17,\ 18,20,18,15,13,15,13,10,8,6,3,6,-8,1,5,-6,-6,6,8,10,11,-13,-13,-13,18,15,17,20,17,13,10,15,12,8 9002 data 13,12,13,12,-13,1,3,-6,-6,6,8,10,11,-13,-13,-13,15,17,18,20,18,15,13,15,13,10,8,6,3,6,-8 9003 data 1,3,6,8,6,8,6,15,13,10,10,8,8,10,-6,-15,13,15,13,10,6,8,10,11,-13,-10,-6,1,3 #end of barnacle bill #initial gfx set up 9090 restore 9300 9100 for x=0 to 63+32+24:read y:poke usr "A"+x,y:next x 9300 data 24,126,126,255,255,126,126,24,\ 24,126,102,247,247,98,126,24,\ 24,126,98,243,239,98,126,24,\ 24,126,98,243,251,98,126,24,\ 24,126,106,235,227,122,126,24,\ 24,126,98,231,251,98,126,24,\ 24,126,114,239,227,98,126,24,\ 24,126,98,251,247,118,126,24 #the hoop for the magnets i j k l 9381 data 0,0,0,0,0,0,60,195,\ 1,1,2,2,2,2,1,1,\ 128,128,64,64,64,64,128,128,\ 195,60,0,0,0,0,0,0 # m n o graphics (the magnet strengths) 9382 data 0,0,0,0,0,56,0,16 ,0,0,0,124,0,56,0,16 ,0,254,0,124,0,56,0,16 #set up the arrays for the position of magnets 9400 dim m(7):dim n(7):dim e(7):dim d(7):dim f(7):dim g(7) #maxlevel = one MORE than the number of harbours 9450 let maxlev=11 9500 return 9900 goto 5000 9999 Pam Ferris's Ferrous Ferries - by Andy Jenkinson for CSSCGC2023