Home » Personal collection » Acorn tapes » Commercial_Releases » boxed_acornsoft_tape10a_acorn_introductory_cassette.wav » RIVERGAME
RIVERGAME
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Personal collection » Acorn tapes » Commercial_Releases » boxed_acornsoft_tape10a_acorn_introductory_cassette.wav |
Filename: | RIVERGAME |
Read OK: | ✔ |
File size: | 2ED2 bytes |
Load address: | FFFF0E00 |
Exec address: | FFFF8023 |
Duplicates
There is 1 duplicate copy of this file in the archive:
- AEW website » acornsoft » acornsoft_tapes_Introductory-Cassette_Intro_E.uef » RIVERGAME
- Personal collection » Acorn tapes » Commercial_Releases » boxed_acornsoft_tape10a_acorn_introductory_cassette.wav » RIVERGAME
File contents
5MODE 4 6M%=LOMEM 7LOMEM=LOMEM+&810 8MEM=M%+2 9REM Make space for data. 10DIMSIZE(4),WHERE(4),W$(4) 20REM Single file RIVGAME 40CLS 50PRINT ''''"You are a man with a boat" 60PRINT "and with a chicken, a fox and some" 70PRINT "grain, which you must get to the other" 80PRINT "side of a river, using your little" 90PRINT "boat. " 100PRINT 110PRINT "Each object, including yourself,may be" 120PRINT " at the right bank (RB)" 130PRINT " at the left bank (LB)" 140PRINT " or in the boat (B)" 150PRINT "and you can move them around as you" 160PRINT "wish. You must remember that the FOX" 170PRINT "will eat the CHICKEN if you are" 180PRINT "not there to keep the peace; and the" 190PRINT "CHICKEN will eat the GRAIN if left" 200PRINT "alone with it." 210PRINT 220PROCSTARTOFF 230PROCWHATNOW 240END 250 260DEF PROCSTARTOFF 270RESTORE 320 280COLOUR 3:PRINT "PROCSTARTOFF"' 290FOR I=0 TO 4 300READ W$(I),SIZE(I):WHERE(I)=1 310NEXT I 320DATA BOAT,1.5,FOX,0.4,CHICKEN,0.3,GRAIN,1.5,MAN,1 330COLOUR 3 340PRINT "Press any key to go on." 350IF GET$="" THEN 350 355REM CHANGE MODE TO MODE 5 360VDU 22,5,24,1;350;1279;700; 370VDU 28,0,8,19,0,31,0,8,19,2,2,0,0,0 375VDU19,2,4;0; 380ENDPROC 390 400DEFPROCSHOWIT 410CLG 420COLOUR 2:PRINT "PROCSHOWIT" 430PROCPIC("RIVER",1,2,-350,-200,1,"") 440FOR I=0 TO 4 450W=WHERE(I)*400-100*I 460IF WHERE(I)=2 OR I=0 THEN W=300+100*WHERE(0):IF I=2 OR I=3 THEN W=W+104 463IF WHERE(I)=2 AND I=1 THEN W=W+52 465IF I=2 THEN H=20 ELSE IF I=1 THEN H=8 ELSE H=0 470PROCPIC(W$(I),SIZE(I),3,W,500+H,1,"") 480NEXT I 490ENDPROC 500 510DEF PROCWHATNOW 520COLOUR 2:PRINT "PROCWHATNOW" 530IF WHERE(0)+WHERE(1)+WHERE(2)+WHERE(3)+WHERE(4)=15 THEN COLOUR 3:PRINT'"You have done it! Congratulations!"':PROCSHOWIT:COLOUR3:END 540PROCSHOWIT 550VDU 28,0,31,19,23,31,0,31 555COLOUR3 560INPUT "What shall I move? (G,F,C,M,B) " THING$ 570IF THING$="" THEN 550 580INPUT "Where to? (LB,B,RB) " PLACE$ 590IF PLACE$="" THEN 580 600CLS 610VDU 28,0,8,19,0,31,0,8 620PROCMOVE(THING$,PLACE$) 630PROCWHATNOW 640ENDPROC 650 660DEF PROCMOVE(WHAT$,WHERE$) 670COLOUR 2:PRINT "PROCMOVE" 680PROCILLEGALMOVE(WHAT$,WHERE$) 690FOR LOOP=0 TO 4 700IF LEFT$(W$(LOOP),1)=WHAT$ THEN PROCPUTIN(WHAT$,WHERE$) 710NEXT LOOP 720PROCDISASTROUSMOVE(WHAT$,WHERE$) 730ENDPROC 740 750DEF PROCILLEGALMOVE(WHAT$,WHERE$) 760COLOUR 2:PRINT "PROCILLEGALMOVE" 770WRONGPLACE=TRUE 780WRONGTHING=TRUE 790WRONGSIDE=FALSE 800HELPLESSBOAT=FALSE 810MANABSENT=FALSE 820BOATLESS=FALSE 830WH=0 840IF WHERE$="LB" THEN WH=1 850IF WHERE$="B" THEN WH=2 860IF WHERE$="RB" THEN WH=3 870IF WH<>0 THEN WRONGPLACE=FALSE 880FOR LOOP=0 TO 4 890IF LEFT$(W$(LOOP),1)=WHAT$ AND LOOP<>0 AND WHERE(LOOP)=4-WH THEN BOATLESS=TRUE 900IF LEFT$(W$(LOOP),1)=WHAT$ AND WHERE(4)<>WHERE(LOOP) AND LOOP<>0 AND WHERE(4)<>WH THEN MANABSENT=TRUE 910IF LEFT$(W$(LOOP),1)=WHAT$ AND WHERE(LOOP)=WH THEN PROCALREADYTHERE(WHAT$,WHERE$):PROCWHATNOW 920IF LEFT$(W$(LOOP),1)=WHAT$ THEN WRONGTHING=FALSE 930NEXT LOOP 940IF WHAT$="B" AND WH<>4-WHERE(0) THEN WRONGSIDE=TRUE 950IF WHAT$="B" AND WHERE(4)<>2 THEN HELPLESSBOAT=TRUE 960IF WRONGPLACE THEN COLOUR 1:PRINT "I don't recognise "'WHERE$:PROCWHATNOW 970IF BOATLESS THEN COLOUR 1:PRINT "Illegal attempt to cross without boat! ":PROCWHATNOW 980IF WRONGTHING THEN COLOUR 1:PRINT "I don't know what a "'WHAT$;" is.":PROCWHATNOW 990IF HELPLESSBOAT THEN COLOUR 1:PRINT "Boat needs somebody to row her!":PROCWHATNOW 1000IF WRONGSIDE THEN COLOUR 1:PRINT "Boat is at the wrongside; cannot do it!":PROCWHATNOW 1010IF MANABSENT THEN COLOUR 1:PRINT "Man is not here!"'"Can not do the"'"moving!":PROCWHATNOW 1020ENDPROC 1030 1040DEF PROCALREADYTHERE(WHAT$,WHERE$) 1050COLOUR 2:PRINT "PROCALREADYTHERE" 1060LOCAL T1$,T2$ 1070T1$=FNTRANSLATE(WHAT$) 1080T2$=FNTRANSLATE(WHERE$) 1090COLOUR 1:PRINT T1$;" is already at "'T2$ 1100ENDPROC 1110 1120DEF FNTRANSLATE(WORD$) 1130RESULT$="":COUNTER=0 1140RESTORE 1200 1150REPEAT 1160COUNTER=COUNTER+1 1170READ TEST$ 1180IF LEFT$(TEST$,1)=LEFT$(WORD$,1) THEN RESULT$=TEST$ 1190UNTIL COUNTER=7 OR RESULT$<>"" 1200DATA MAN,CHICKEN,FOX,GRAIN,BOAT,LBANK,RBANK 1210=RESULT$ 1220 1230DEFPROCPUTIN(WHAT$,WHERE$) 1240IF WHERE$="LB" THEN WH=1 1250IF WHERE$="B" THEN WH=2 1260IF WHERE$="RB" THEN WH=3 1270FOR I=0 TO 4 1280IF LEFT$(W$(I),1)=WHAT$ THEN WHERE(I)=WH 1290NEXT 1300ENDPROC 1310 1320DEF PROCDISASTROUSMOVE(WHAT$,WHERE$) 1330COLOUR 2:PRINT "PROCDISASTROUSMOVE" 1340INBOAT=0 1350FOR I=1 TO 4 1360IF WHERE(I)=2 THEN INBOAT=INBOAT+1 1370NEXT I 1380IF INBOAT>2 THEN COLOUR 1:PRINT "The boat has sunk I'mafraid. Only two"'"people allowed!":PROCSHOWIT:PROCSTARTOFF 1390IF FNSUPPER("F","C")=FALSE AND FNSUPPER("C","G")=FALSE THEN ENDPROC 1400ENDPROC 1410 1420DEF FNSUPPER(ACTIVE$,PASSIVE$) 1430COLOUR 2:PRINT "FNSUPPER" 1440FOR I=0 TO 4 1450IF LEFT$(W$(I),1)=ACTIVE$ THEN A=I 1460IF LEFT$(W$(I),1)=PASSIVE$ THEN P=I 1470NEXT I 1480IF (WHERE(A)=WHERE(P)) AND (WHERE(A)<>WHERE(4)) THEN COLOUR 1:PRINT "THE ";FNTRANSLATE(PASSIVE$)" HAS BEEN"'"EATEN BY THE ";FNTRANSLATE(ACTIVE$):PROCSHOWIT:PROCSTARTOFF 1490=((WHERE(A)=WHERE(P)) AND (WHERE(A)<>WHERE(4))) 1500 1510DEFPROCPIC(name$,size,colour,posx,posy,on,comment$) 1520GCOL 0,colour 1530VDU 5 1540MOVE posx,posy-48 1550PRINT comment$ 1560VDU 4 1570LOCAL place,col%,plot%,x,y,mag,len,i%,j 1580place=MEM+4 1590IF $(place)=name$ THEN 1640 1600REPEAT 1610place=place+!(place-4) 1620UNTIL $(place)="" OR $(place)=name$ 1630IF $(place)="" THEN ENDPROC 1640len=!(place-4) 1650place=place+LEN(name$)+1 1660MOVE posx,posy 1670FOR i%=0 TO len-LEN(name$)-15 STEP 10 1680plot%=?(place+i%) 1690col%=?(place+i%+1) 1700IF col%=3 THEN col%=colour 1710x=!(place+i%+2)*size 1720y=!(place+i%+6)*size 1730GCOL 0,col%*on 1740IF plot%<>72 AND plot%<>73 THEN PLOT plot%,x,y : GOTO 1850 1750IF x<4 THEN 1850 1760PLOT 0,0,x : PLOT 65,0,0 1770FOR j=x-4 TO -x+4 STEP -4 1780PLOT 0,0,-4 1790y=SQR(x*x-j*j) 1800PLOT 0,-y,0:PLOT 65,0,0 1810IF plot%=73 THEN PLOT1,2*y,0 ELSE PLOT0,2*y,0 1820PLOT 65,0,0:PLOT 0,-y,0 1830NEXT j 1840PLOT 0,0,-4:PLOT 65,0,0 1850NEXT i% 1860MOVE 0,0 1870ENDPROC
� 4 M%=� �=�+&810 MEM=M%+2 � Make space for data. �SIZE(4),WHERE(4),W$(4) � Single file RIVGAME (� 2%� ''''"You are a man with a boat" <*� "and with a chicken, a fox and some" F.� "grain, which you must get to the other" P*� "side of a river, using your little" Z� "boat. " d� n.� "Each object, including yourself,may be" x$� " at the right bank (RB)" �#� " at the left bank (LB)" � � " or in the boat (B)" �+� "and you can move them around as you" �,� "wish. You must remember that the FOX" �'� "will eat the CHICKEN if you are" �,� "not there to keep the peace; and the" �*� "CHICKEN will eat the GRAIN if left" �� "alone with it." �� � �STARTOFF ��WHATNOW �� � � �STARTOFF � �D@A � 3:� "PROCSTARTOFF"' " � I=0 � 4 ,� W$(I),SIZE(I):WHERE(I)=1 6� I @2� BOAT,1.5,FOX,0.4,CHICKEN,0.3,GRAIN,1.5,MAN,1 J� 3 T� "Press any key to go on." ^� �="" � �D^A c� CHANGE MODE TO MODE 5 h� 22,5,24,1;350;1279;700; r%� 28,0,8,19,0,31,0,8,19,2,2,0,0,0 w�19,2,4;0; |� � ���SHOWIT �� �� 2:� "PROCSHOWIT" �$�PIC("RIVER",1,2,-350,-200,1,"") � � I=0 � 4 �W=WHERE(I)*400-100*I �A� WHERE(I)=2 � I=0 � W=300+100*WHERE(0):� I=2 � I=3 � W=W+104 �� WHERE(I)=2 � I=1 � W=W+52 �$� I=2 � H=20 � � I=1 � H=8 � H=0 �&�PIC(W$(I),SIZE(I),3,W,500+H,1,"") �� I �� � �� �WHATNOW � 2:� "PROCWHATNOW" r� WHERE(0)+WHERE(1)+WHERE(2)+WHERE(3)+WHERE(4)=15 � � 3:�'"You have done it! Congratulations!"':�SHOWIT:�3:� �SHOWIT &� 28,0,31,19,23,31,0,31 +�3 0/� "What shall I move? (G,F,C,M,B) " THING$ :� THING$="" � �TfB D#� "Where to? (LB,B,RB) " PLACE$ N� PLACE$="" � �DDB X� b� 28,0,8,19,0,31,0,8 l�MOVE(THING$,PLACE$) v�WHATNOW �� � �� �MOVE(WHAT$,WHERE$) �� 2:� "PROCMOVE" ��ILLEGALMOVE(WHAT$,WHERE$) �� LOOP=0 � 4 �/� �W$(LOOP),1)=WHAT$ � �PUTIN(WHAT$,WHERE$) � � LOOP �!�DISASTROUSMOVE(WHAT$,WHERE$) �� � � � �ILLEGALMOVE(WHAT$,WHERE$) �� 2:� "PROCILLEGALMOVE" WRONGPLACE=� WRONGTHING=� WRONGSIDE=� HELPLESSBOAT=� *MANABSENT=� 4BOATLESS=� >WH=0 H� WHERE$="LB" � WH=1 R� WHERE$="B" � WH=2 \� WHERE$="RB" � WH=3 f� WH<>0 � WRONGPLACE=� p� LOOP=0 � 4 zC� �W$(LOOP),1)=WHAT$ � LOOP<>0 � WHERE(LOOP)=4-WH � BOATLESS=� �W� �W$(LOOP),1)=WHAT$ � WHERE(4)<>WHERE(LOOP) � LOOP<>0 � WHERE(4)<>WH � MANABSENT=� �P� �W$(LOOP),1)=WHAT$ � WHERE(LOOP)=WH � �ALREADYTHERE(WHAT$,WHERE$):�WHATNOW �'� �W$(LOOP),1)=WHAT$ � WRONGTHING=� � � LOOP �.� WHAT$="B" � WH<>4-WHERE(0) � WRONGSIDE=� �.� WHAT$="B" � WHERE(4)<>2 � HELPLESSBOAT=� �=� WRONGPLACE � � 1:� "I don't recognise "'WHERE$:�WHATNOW �J� BOATLESS � � 1:� "Illegal attempt to cross without boat! ":�WHATNOW �E� WRONGTHING � � 1:� "I don't know what a "'WHAT$;" is.":�WHATNOW �E� HELPLESSBOAT � � 1:� "Boat needs somebody to row her!":�WHATNOW �J� WRONGSIDE � � 1:� "Boat is at the wrongside; cannot do it!":�WHATNOW �N� MANABSENT � � 1:� "Man is not here!"'"Can not do the"'"moving!":�WHATNOW �� !� �ALREADYTHERE(WHAT$,WHERE$) � 2:� "PROCALREADYTHERE" $ � T1$,T2$ .T1$=�TRANSLATE(WHAT$) 8T2$=�TRANSLATE(WHERE$) B#� 1:� T1$;" is already at "'T2$ L� V `� �TRANSLATE(WORD$) jRESULT$="":COUNTER=0 t � �tpD ~� �COUNTER=COUNTER+1 �� TEST$ �)� �TEST$,1)=�WORD$,1) � RESULT$=TEST$ �� COUNTER=7 � RESULT$<>"" �,� MAN,CHICKEN,FOX,GRAIN,BOAT,LBANK,RBANK �=RESULT$ � ���PUTIN(WHAT$,WHERE$) �� WHERE$="LB" � WH=1 �� WHERE$="B" � WH=2 �� WHERE$="RB" � WH=3 � � I=0 � 4 #� �W$(I),1)=WHAT$ � WHERE(I)=WH � � (#� �DISASTROUSMOVE(WHAT$,WHERE$) 2� 2:� "PROCDISASTROUSMOVE" <INBOAT=0 F � I=1 � 4 P"� WHERE(I)=2 � INBOAT=INBOAT+1 Z� I db� INBOAT>2 � � 1:� "The boat has sunk I'mafraid. Only two"'"people allowed!":�SHOWIT:�STARTOFF n1� �SUPPER("F","C")=� � �SUPPER("C","G")=� � � x� � �� �SUPPER(ACTIVE$,PASSIVE$) �� 2:� "FNSUPPER" � � I=0 � 4 �� �W$(I),1)=ACTIVE$ � A=I �� �W$(I),1)=PASSIVE$ � P=I �� I ȕ� (WHERE(A)=WHERE(P)) � (WHERE(A)<>WHERE(4)) � � 1:� "THE ";�TRANSLATE(PASSIVE$)" HAS BEEN"'"EATEN BY THE ";�TRANSLATE(ACTIVE$):�SHOWIT:�STARTOFF �1=((WHERE(A)=WHERE(P)) � (WHERE(A)<>WHERE(4))) � �2��PIC(name$,size,colour,posx,posy,on,comment$) �� 0,colour �� 5 � posx,posy-48 � comment$ � 4 "'� place,col%,plot%,x,y,mag,len,i%,j ,place=MEM+4 6� $(place)=name$ � �DhF @� Jplace=place+!(place-4) T"� $(place)="" � $(place)=name$ ^� $(place)="" � � hlen=!(place-4) rplace=place+�(name$)+1 |� posx,posy �!� i%=0 � len-�(name$)-15 � 10 �plot%=?(place+i%) �col%=?(place+i%+1) �� col%=3 � col%=colour �x=!(place+i%+2)*size �y=!(place+i%+6)*size �� 0,col%*on �2� plot%<>72 � plot%<>73 � � plot%,x,y : � �TzG �� x<4 � �TzG �� 0,0,x : � 65,0,0 �� j=x-4 � -x+4 � -4 �� 0,0,-4 �y=�(x*x-j*j) � 0,-y,0:� 65,0,0 $� plot%=73 � �1,2*y,0 � �0,2*y,0 � 65,0,0:� 0,-y,0 &� j 0� 0,0,-4:� 65,0,0 :� i% D � 0,0 N� �O HOUSE F Qd ����Q F �� Q������Q ��� Q ��Q <