


•‘•sas: 

’Cecijjm. 


ta Pe CAVESM 


Ot* s 


1\.« 








Si** 

ASty, 


2,t*° 


*<V. *» 


^V\sV^ 

*t* v , co^JU s-tl 

TS^V- 

#$•'* 
k 2 ® 1*1 ^.3® . 


d £ *t*h 

*£» 


271 


»■*— 

rf-». i . . ; " 




c °st/a 


*«7 fl 


VOr 


5 ij- 


5 n 








^^8 




?•• ^**i*»'*c 
$ c 
?• ?;ir - 

^a® © 1974 by People's Computer Company, 1263 El Camino Real, Box E, Menlo Park CA 94025 

26® 

-«m» ,-flUf • I 

L **• £&:***'«*„„ 

"'"r .. J?" 0 /^,.. 


aa &>'"•''••’'■? **• 

^/Vr ^Oe, °^a 


""■r 9 . 

•*e*s 


/*s7 Thf 

&>• ,7.'"r - Sr «» 


3 «5* 






3l« 

^6* 

y>® 

lit 


SS*'**’”,, 


t*6 




NUMBER 

See October ’72 issue PCC Vol. 1, No. 1, pages 8,9. 

Length: 428 words. 

100 REM +** NUMBER *** A NUMBER GUESSING GAME *** 

110 HEM *** COPYRIGHT# PEOPLE'S COMPUTER COMPANY *** 

120 REM 1921 MENALTO AWENUE# MENLO PA*K, CA. 94025 *** 

200 REM PRINT INSTRUCTIONS ON HOW TO PLAY 

210 PRINT "I WILL THINK OF A WHOLE NUMBER BETWEEN 1 AND 1?*. 
220 PRINT "TRY TO GUESS MY NUMBER. AFTER EACH G'JESS# I V ILL" 
230 PRINT "TELL YOU IF YOU HAVE GUESSED MY NUMBER OK IF YOJK 
240 PRINT "GUESS IS 100 SMALL 0.* TOO BIG." 

300 REM COMPUTE* 'THINKS' OF A NUMBER - CALL IT X 

310 LET X-INT<100*«ND<0) 

320 PRINT 

330 PRINT "OK# I HAVE A NUMBER. START GUESSING." 

430 REM *** HUMAN STARTS GUESSING 
410 PKIN1 

420 PRINT "WHAT IS YOUR GUESS"! 

430 INPUT G 

440 IF G-X THEN 500 

450 IF G»X THEN 480 

460 PRINT "TOO SMALL. TrtY A LAnGER NUMBER." 

470 GOTO 410 

480 PRINT "TOO BIG. TRY A SMALLER NUMBER." 

490 GOTO 410 

500 MEM ♦** HUMAN HAS GUESSED THE COMPUTER'S NUMBER 
510 PRINT 

520 PRINT "YOU GOT IT! LET'S PLAY AGAIN." 

530 PRINT 
540 GOTO 300 
999 END 


LETTER 


page 11. 


Length: 418 words. 


100 REM *** LETTER - A LETTER GUESSING GAME 

110 DIM ASC263 

1P0 LET AS-"ABCDEFGHIJKLMNOPUitSTUVWXYX 

200 REM ♦ phi NT INSTRUCT IONS ON HOW TO PLAY 

210 PRINT "1 WILL THINK OF A LETTER OF THr. ALPHABET# A 10 Z." 

HI ^ NT "THY 10 GUESS MY LETTER. AFTER EACH GUESS. I WILL" 

111 PH NT "TELL YOU IP YOU GUESSED MY LETT Ell OH IT YOU,. GUESS' 
III PRINT "IS TOO HIGH OH TOO LOW. THE LOWEST LETTER IS 'A'" 
250 PRINT "AND THE HIGHEST tElTEn IS 'E'." 

300 HEM ... C0KPU1EH THINKS OF A LET1EK 
310 LET X»INT(26*RND<0))♦! 

320 LET L*«A*CX#X3 

III PhInJ "OK. I HAVE A LETTER. START GUESSING." 

400 REM *♦* HUMAN STARTS GUESSING 
410 PRINT (tlpi;CMi 

420 PRINT "WHAT IS YOUH GUESS i 

430 INPUT nr 
440 IF GS-Lt THEN 500 

450 IF GS>L$ THEN 480 ^ T .. u „ 

460 PRINT "TOO LOW. TRY A HIGHER LETTER. 

480 PRINT "TOO HIGH. TRY A LOWER LETTER." 

500 HEM°*** HUMAN HAS GUESSED THE LETTER 
510 |>h I NT 

520 PHINT "YOU GOT ITI LET'S PLAY AGAIN." 

530 PRINT 
540 GOTO 300 
999 END 


ABOUT PEOPLE’S COMPUTER COMPANY: 


i 


People’s Computer Company publishes the magazines 
listed below. We also have a retail bookstore that carries 
a variety of computer-related publications. Write for catalog. 


People’s Computers is a magazine 
for beginning and intermediate level 
computer users, educators and 
those who wonder what computing 
is all about. Games, listings, pro¬ 
gramming languages, consumer 
advice and more. 

6 issues a year. $8 a year. 


Dr. Dobb’s Journal places significant 
software into the public domain 
and provides a communications 
medium for interested hobbyists. 
Offers independent product reviews, 
consumer information, and com¬ 
plete systems and applications 
software. 

10 issues a year. $12 a year. 

“THE software source for micro¬ 
computers. Highly recommended.” 
—Philadelphia Area Computer 
Society, The Data Bus 


The Computer Music Journal is 
devoted to high-quality musical 
applications of computers. A unique 
source of consumer and technical 
information on the art and science 
of computer generated music. 

4 issues a year. $10 a year. 






STARS 

See Dec.72 issue PCC Vol. 1, No.2, page 3. 

See May ’73 issue PCC Vol. 1, No.5, page 19. 

Length: 583 words. 

100 HEM *** STAKS - PEOPLE'S COMPUTEK CENTER# MENLO PARK# CA 
H0 PRINT "STAKS - A NUMBER GUESSING GAME" 

120 PH I NT 

130 REM ♦ ** A IS LIMIT ON NUMBER 
140 LEI A-100 

160 PRINT "DO YOU WANT INSTRUCTIONS”! 

170 INPUT ZSC1#13 

180 IF Z* <> "Y” THEN 270 

190 REM **♦ INSTRUCTIONS ON HOW TO PLAY 

200 PRINT "I AM THINKING OF A WHOLE NUMBER FROM 1 TO"!A 
210 PRINT "TRY TO GUESS MY NUMBER. AFTER YOU GUESS# I" 

220 PRINT "WILL TYPE ONE OR MORE STARS <*>. THE MOKE" 

230 PHINT "STARS I TYPE# THE CLOSER YOJ ARE TO MY NUMBER." 

240 PRINT "ONE STAR <*) MEANS FAH AWAY. SEVEN STARS (******♦>" 
250 Print "MEANS REALLY CLOSE!" 

260 REM *** COMPUTER 'THINKS* OF A NUMBER 
270 PHINT 

280 print 

290 LET X«INT(A*kND< 0>)+l 

300 PRINT "OK# I AM THINKING OF A NUMBER. START GUESSING." 

310 REM *♦* GUESSING BEGINS 
320 K-l 
330 PRINT 

340 PRINT "YOUR GUESS"! 

350 INPJf G 

360 IF G-X THEN 590 

370 LET D-ABS(X-G) 

380 IF D »« 64 THEN 500 

390 IF D >■ 32 THEN 490 

400 IF D >» 16 THEN 480 

410 IF D >■ 8 THEN 470 

420 IF D >« 4 THEN 460 

430 IF D »« 2 THEN 450 

440 PRINT "* "! 

450 PRINT "* "! 

460 PRINT "* "# 

470 PRINT "* "! 

480 PRINT "* "i 
490 PRINT "* "1 
500 PRINT "* "i 
510 PHINT 
520 KaK+1 
530 GOTO 330 

580 REM *** WE HAVE A WINNER 
590 FOR N-l TO 50 
600 PRINT "*"! 

610 NEXT N 
600 PRINT "I ! !" 

630 PRINT "YOJ GOT IT IN"!K!"GUESSES!!! LET’S PLAY AGAIN." 

640 GOTO 273 
660 END 


TRAP 2 

See Feb.’73 issue PCC Vol. 1, No. 3, page 8. 

Length: 580 words. 


I 00 
1 20 
I 30 
I 40 

1 50 
I 60 
I 70 
I 80 

1 90 

2 00 
2 10 
2 20 
2 30 
2 40 
2 50 
2 70 
2 80 

2 90 
300 
310 

3 20 
3 30 
3 40 
3 50 
3 60 
3 70 
.3 80 

3 90 
400 

4 10 
4 20 
4 30 
4 40 
450 
4 80 

4 90 

5 00 
5 10 
520 
5 30 
5 40 
5 50 


REMARK TRAP...OYMAX# P.O. BOX 310# MENLO PARK CA 94025 
LET N*100 

PRINT "00 YOU WANT INSTRUCTIONS"! 

INPUT ZSC1,I 1 

IF ZS <> "Y" THEN 2 70 

PRINT 

PRINT "1 WILL THINK OF A WHOLE NUMBER FROM 1 TO"IN 
PRINT "TRY TO GJESS MY NUMBER. ENTER TWO NUMBERS# TRYING" 
PRINT "TO TRAP MY NUMBER BETWEEN YOUR TWO NUMBERS. 1 WILL" 
PRINT "TELL rO'J IF YOU HAVE TRAPPED MY NUMBER OR IF MY" 
PRINT "NUMBER IS SMALLER THAN YOUR TWO TRAP NUMBERS OR" 
PRINT "IF MY NUMBER IS LARGER THAN YOUR TWO TRAP NUMBERS." 
PRINT "IF YOU THINK YOU KNOW WHAT MY NUMBER IS, ENTER " 
PRINT "YOUR GUESS FOR BOTH TRAP NUMBERS." 

P ft I NT 
PRINT 

LET X»INT C N*RND C0 ) )♦1 

LET K«I 

PRINT 

PRINT "GUESS NUMBER"IK 
PRINT "FIRST TRAP NUMBER"! 

INPUT A 

PRINT "SECOND TRAP NUMBER"! 

INPUT B 

LET T*SGN(X-A)♦SGN(X-B > 

GOTO TO OF 410,390,380,390,430 
IF A*B THEN 500 

PRINT "MY NUMBER IS TRAPPED BY YOUR NUMBERS." 

GOTO 440 

PRINT "MY NUMBER IS SMALLER THAN YO'J.R TRAP NUMBERS." 

GOTO 440 

PRINT "MY NUMBER IS LARGER THAN YOUR TRAP NUMBERS." 

K* K ♦ I 
GOTO 300 

PRINT "LET’S PLAY AGAIN. BETTER LUCK NEXT TIME!" 

GOTO 2 70 

PRINT "YOU GOT IT IN" I K I" Gt IESSES ! I " 

PRINT 

PRINT "DO YOU WANT TO PLAY AGAIN"! 

INPUT /.J>t! #! 1 

IF Z*»"Y" THEN 270 

ENO 


BAGELS was originally written by Pete Rowe at Lawrence 
Hall of Science. Permission was granted for its use in this booklet. 

BAGELS 

See Dec.’72 issue PCC Vol. 1, No. 2, page 18. 

Length: 859 words. 

10 HEM BAGKLS 

» HEM ♦** MODIFIED FKED MOOKE FOK 
30 HEM PEOPLES COMPUTEK COMPANY 

40 DIM NC3 3#AC31 
50 HEM **• INSTRUCTIONS 

€0 PHINT "WANT THE KULES <I-YES#0-NO>"! 


70 INPUT K 

00 IF R o | THEN 150 
90 PH I NT 

100 PKINT ”1 AM THINKING OF A THHEE DIGIT NUMBER (NO DIGITS THE SAME)." 

110 PHINT "THY TO GUESS MY NUMBER. AFTER EACH GUESS I WILL PKINT:" 

120 PHINT " ‘FERMI* FOR EACH CORRECT DIGIT IN THE CORRECT PLACE#" 

130 PRINT " ‘PICO* FOR EACH CORRECT DIGIT IN THE WRONG PLACE# OH" 

140 PRINT " ‘BAGELS’ IF NO DIGIT IS CORRECT." 

150 REM ♦** SELECT NUMBER AT RANDOM 
160 NC33-INT(RND(0)*9+1) 

170 NC2 3*INT(RNDC 0)* 13) 

180 IF NC23-NC33 THEN 170 
190 NCI3-INT(HND(0>*10) 

200 IF NC13-NC23 THEN 190 
210 IF NC13-NC33 THEN 190 
220 PRINT 

230 PRINT "OK# I HAVE A NUMBER." 

240 G-0 

250 REM *+* A GUESS 
260 PRINT 
270 PRINT 

280 PRINT "YOUR GUESS"3 
290 INPUT X 
300 G-G+l 

310 AC3 3*1NT(X/l00) 

320 A C 2 3 * I NT (X/10)«AC33*10 
330 AC 1 3 -X -1 NT (X/10)*10 
340 IF AC3 3>9 THEN 410 
350 IF AC33«1 THEN 410 
360 IF INT(X) <> X THEN 410 
370 IF AC 13*AC2 3 THEN 410 
380 IF AC23-AC33 THEN 410 
390 IF AC 13*AC3 3 THEN 410 
400 GOTO 440 

410 PRINT " PICK 4 THREE DIGIT NUMBER FROM 102 TO 987" 

420 PRINT " HINT* IN MY NUMBER ALL THE DIGITS AP.E DIFFERENT" 

430 GOTO 270 

440 REM *** COMPARE GUESS WITH SELECTED NUMBER 

450 F*P*0 

460 FOR 1*1 TO 3 

470 FOR J-l TO 3 

480 IF ACI3-NCJ3 THEN 540 

490 NEXT J 

500 NEXT I 

510 IF F+P <> 0 THEN 590 
520 PRINT "BAGELS") 

530 GOTO 260 

540 IF I-J THEN 570 

550 P-P + l 

560 GOTO 490 

570 F-F + l 

580 GOTO 490 

590 IF P-9 THEN 630 

600 FOR K-l TO P 

619 PHINT ‘VICO "i 

620 NEXT K 

630 IF F-0 THEN 269 
640 IF F-3 THEN 690 
653 FOR K-l TO F 
660 PRINT "FEnMI "l 
670 NEXT K 
660 GOTO 260 
690 PRINT 

700 PRINT "YOU GOT IT IN"iGi"GUESSESI!I" 

710 PRINT 

720 PHINT "YOU WANT TO PLAY AGAIN (l-YES# 0-NO)"; 

730 INPUT R 

740 IF R <> 0 THEN 150 

750 END 


BAGEL2 


BEYOND BAGELS 


3 


Length: 1015 words. 


10 

00 

30 

40 

50 

60 

70 


100 

110 

120 

130 

140 

150 

160 

170 

180 

190 

200 

210 

220 

230 

240 

250 

260 

270 

280 

290 

300 

310 

320 

330 

340 

350 

360 

370 

380 

390 

400 

410 

420 

430 

440 

450 

460 

470 

480 

490 

500 

510 

520 

530 

540 

550 

560 

570 

500 

590 

600 

610 

620 


REM BEYOND BAGELS *♦* 

REM *** G CONTROLS THE MAXIMUM NUMBER OF GUESSES 
G-20 

PRINT "WELCOME TO *** BEYOND BAGELS ***" 

PRINT 

PRINT "RULES (l-YES 0-NO)"; 

INPUT X 
PRINT 

IF X o 1 THEN 310 

PRINT " I*LL THINK OF A THREE DIGIT NUMBER (LIKE 532)" 

PRINT "AND YOU HAVE";G1"TRIES TO GUESS IT. AFTER YOU TELL ME" 
PRINT "YOUR GUESS# I’LL PRINT YOUR SCORE FOR THAT GUESS." 

PRINT 

PRINT "YOU GET I POINT FOR EACH DIGIT THAT'S ALSO IN MY NJMBER#" 
PRINT "AND ANOTHER POINT FOR EACH CORRECT DIGIT THAT'S ALSO" 
PHINT "IN THE CORRECT PLACE." 

PRINT 

PRINT "IF MY NUMBER IS 532" 

PRINT "AND YOU GUESS 421" 

PRINT "YOU GET 1 POINT (FOR THE 2)" 

PRINT 

PRINT "IF MY NUMBER IS 689" 

PRINT "AND YOU GUESS 692" 

PRINT "YOU GET 3 POINTS (2 BECAUSE OF THE 6# AND" 

PRINT "THE 9 ADDS THE OTHER POINT" 

PRINT 

PRINT "BUT BE CAREFUL I SOME SCORES (LIKE 3 POINTS)" 

PRINT "CAN BE MADE IN MORE THAN ONE WAY !!!" 

PRINT 

PRINT "HERE WE GO..." 

DIM AC33#3C33 

ACI3-1NT(KND(9)*9 >♦1 

AC2 3-INT(KND(0)* 10) 

IF AC23-AC13 THEN 330 
AC3 3»INT(RND(0)*10) 

IF AC33-AC23 THEN 350 
IF AC33-AC13 THEN 350 
PRINT "I *VE PICKED MY NUMBER" 

PRINT 

FOR G1 — I TO G 
PRINT 

PRINT "GUESS #";gi; 

INPUT X 

IF X >■ 100 AND X <« 999 THEN 470 

PRINT "HINT* MY NUMBErt HAS THREE DIGITS" 

GOTO 410 
P-0 

FOR 1-1 TO 3 
BCI 3-INT(X/100) 

X«10*(X-100*BCI3> 

NEXT I 

IF P-6 THEN 750 

IF BC1 3 <> BC23 AND BC13 <> BC33 AND BC23 <> BC33 THEN 5(0 
PRINT "HINT* IN MY NUMBER# ALL THE DIGITS ARE DIFFERENT" 

GOTO 410 
FOR 1-1 TO 3 
FOR J-l TO 3 

IF BCI3 <> A C J 3 THEN 620 
P-P+l 

IF I <» J THEN 620 

P-P+l 

NEXT J 


630 NEXT I 

640 IF P-6 THEN 750 

650 IF F <> I THEN 680 

660 PRINT PJ"POINT FOR THIS ONE” 

670 GOTO 690 

680 PRINT P”POINTS FOR THIS ONE” 

690 NEXT G1 
700 PRINT 
710 PRINT 

720 PHINT ”SOilHY YOU DIDN'T GUESS IT." 

730 PRINT "MY NUMBER WAS ";ACl3;AC23;AC33 
740 GOTO 820 
750 PRINT 
760 PRINT 

770 PRINT "YOU GUESSED IT IN "JG1J" GUESSES III" 
780 FOR I-l TO G/2-G1 * 

790 PRINT ""I 
«00 NEXT I 
810 PRINT 

820 PRINT "PLAY AGAIN Cl-YES 0-NO>"; 

830 INPUT X 

HAM IK X-1 THEN 290 

HS0 PRINT "BYEI" 

860 END 

MUGWUMP 

See Feb.’73 issue PCC Vol. 1, No.3, page 8. 

See April ’73 issue PCC Vol. 1, No.4, page 3. 
Length: 785 words. 


100 

110 

120 

130 

150 

160 

170 

180 

190 

200 

210 

220 

230 

240 

250 

260 

270 

280 

290 

300 

310 

340 

3S0 

360 

370 

390 

400 

410 

420 

430 

440 

450 

460 

470 

500 


REM MUGWUMP - A HIDE AND SEEK GAME 

mEM *** PEOPLE'S COMPUTER COMPANY. MENLO PARK CA 

HEM *** G-GRID SIZE 

LET G-10 

PRINT "DO YOU WANT THE RULES"; 

INPUT Z$ C1,13 

IF Z* <> "Y" THEN 340 

HEM *** RULES IN LINES 200 THRU 330 

PRINT "A MUGWUMP IS HIDING IN A";Gi"BY";G;"GRID. THY TO" 

PRINT "FIND HIM BY GUESSING HIS GRIDPOINT. HOMEBASE IS" 

PHINT "GRIDPOINT 0,0 AND A GUESS IS A PAIR OF WHOLE" 

print "numbers (0 to"jg-i;"> separated by a comma, the first" 

PHINT "NUMBER IS THE DISTANCE TO THE RIGHT OF HOMEBASE" 

PHINT "AND THE SECOND NUMBER IS THE DISTANCE ABOVE THE" 

PRINT "HOMEBASE. FOR EXAMPLE, IF YOU THINK THE MUGWUMP" 

PRINT "IS HIDING fl UNITS 10 THE rIGHT OF HOMEBASE AND" 


PRINT 

PRINT 

PRINT 

PRINT 

PRINT 


UNITS ABOVE HOMEBASE, THEN ENTER 
•GUESS AND r-RESS THE 'RETURN* KEY." 


8,3 AS YOUR" 


'AFlEh EACH GUESS, I WILL TELL YOU HOW FAR (IN 
•DIRECT LINE) YOU ARE FROM THE MUGWUMP." 

LET A*INTC G*rND< 0)) 

LET B-INTCG*RND<0)) 

PRINT 

'THE MUGWUMP IS HIDING. TRY TO FIND HIM." 


"WHAT IS YOUR GUESS" 


PRINT 
T-l 
PRINT 
PHINT 
INPUT 

REM *** IF MUGWUMP NOT FOUND GO TO LINE 500 
IF X <> A THEN 510 
IF Y <> B THEN 510 

PRINT "YOU FOUND HIM IN";T;"GUESSES!!!" 

GOTO 600 

REM *** D-STRAIGHTLINE DISTANCE TO MUGWUMP 


4 


510 LET D-SQRC(X-A)»2+(Y-B)»2) 

520 REM *** THEN WE ROUND D TO ONE DECIMAL PLACE 
530 LET D-1NT(10*D)/10 

540 PRINT "YOU ARE";D;"UNITS FROM THE MUGWUMP." 

550 T-T+l 
560 GOTO 400 

®0 PRINT "LET'S PLAY AGAIN." 

610 PRINT 

€00 IF KND(0 ) < • 1 THEN 340 

630 PRINT "WAIT A MINUTE - THE MUGWUMP HAS TO TIE IT'S SHOES." 
640 ENTER 5,X,Y 
€60 PRINT "O.K." 

660 GOTO 340 
670 END 


HURKLE 

See Feb.’73 issue PCC Vol. 1, No. 3, page 8. 

See April ’73 issue PCC Vol. 1, No.4, page 22. 

Length: 981 words. 

*** HJRKLE - PEOPLE'S COMPUTER COMPANY, MENLO PARK, CA 
110 REM *** RANDOM 

140 PRINT "DO YOU WANT THE RULES <1-YES 0*NO>"; 

150 INPUT Z 

160 IF Z <> 1 THEN 490 

170 HEM *** HERE ARE THE RULES 

" A HUitKLE IS HIDING IN A GRID, LIKE THE ONE BELOW." 

lyu PHINT 
200 PRINT 

210 PRINT TAB(26)j"NORTH" 

220 PRINT 

230 FOR K-9 TO 0 STEP -I 
240 IF K <> 4 THEN 270 

250 PRINT TAB(8>;"WEST 4";TAB<20>;". EAST" 

260 GOTO 280 1 

270 PRINT TAB< 14 ) ; K1 TAB(20 ) ;".. 

280 NEXT K 
290 PRINT 

300 PRINT TAB(20)"0 123456789" 

310 PHINT 

320 PRINT TAB(26)1"SOUTH" 

330 PRINT 

^ hIv**!? (4UESS taHErtK THE HURKLE IS HIDING. YOU GUESS" 

2! , t ?L T 5h LINCi ME THK I DP 01 NT WHERE YOU THINK THAT" 

360 PHIN1 THE HURKLE IS HIDING. HOMEBASE IS POINT 0,0 IN" 

370 PHINT "THE SOUTHWEST CORNER. YOUR GUESS SHOULD BE A PAIR" 

380 HN1 "OF WHOLE NUMBERS, SEPARATED BY h COMMA. THE FIRST- 
390 PHINT 'NUMBER TELLS HOW FAR TO THE RIGHT OF HOMEBASE AND" 

400 PRINT ’THE SECOND NUMBER TELLS HOW FAR ABOVE HOMEBASE YOU" 
410 PRINT THINK THK HURKLE Is HIDING. FOR EXAMPLE, lh YOU " 

420 PRINT "THINK IRE HURKLE Is 7 TO jHE RIGHT AND S ABOVE" 

430 PRINT "HOMEBASE, YOU ENTER 7.5 AS YOUR GUESS aSu ^FN" 

440 Print -press the 'return* key. am EH EACH GUESS, ? WILL" 

Pr!m T ” TKLL rrk. l HK DIRECTION TO GO FOR YOUR" 

460 PRINT "NEXT (lUE^S. mjQlJ LUCK I" 


470 

PRINT 




480 

HEM *♦* HURKLE 'PICKS' A GRIDPOINT 

AND 

HIDES 

490 

LET A«INT(10 + HND(0)> 




500 

LET BMNT< 10ORND<0> > 




510 

PHINT 




520 

PHINT "THE HUKKLE IS HIDING. TRY TO FIND 

HIM." 

530 

PRINT 




540 

REM *** GET A GUESS AND PHINT INFO 

FOR 

PLAYER 

550 

K«1 




560 

PRINT "WHAT IS YOUR GUESS"; 




570 

INPUT X,Y 




580 

LF ABS(X-A)+ABS < Y-B)*0 THEN 710 




590 

HEM *** GO TO INFO SUBROUTINE 




600 

GOSUB 760 




610 

PRINT 




620 

K-K+l 




630 

GOTO 5 60 




700 

REM *** HURKLE HAS BEEN FOUND! 




710 

PRINT 




720 

PRINT "YOU FOUND HIM IN"K;"GUESSES 

I ! !" 



730 

PRINT "LET'S PLAY AGAIN." 




740 

GOTO 490 




750 

REM *** SUBROUTINE! PRINT INFORMATION 

FOR 

NEXT GUESS 

760 

PRINT "GO "1 




770 

IF Y«B THEN 820 




780 

IF Y<B THEN 810 




790 

PHINT "SOUTH"; 




800 

GOTO 820 




810 

PRINT "NORTH"; 




820 

IF X»A THEN 870 




830 

IF X<A THEN 860 




640 

PRINT "WEST"; 




850 

GOTO 870 




860 

PRINT "EAST"; 




870 

PRINT 




880 

RETURN 




890 

END 





SNARK 


5 


Length: 867 words. 


100 

U0 

120 

150 

160 

170 

200 

210 

220 

230 

240 

245 

250 

260 

273 

260 

290 

300 

310 

320 

330 

340 

350 

360 

370 

380 

390 

400 

410 

500 

510 

520 

530 

540 

600 

610 

620 

630 

640 

650 

660 

670 


700 

710 

720 

730 

740 

750 

760 

770 

780 

790 

900 

910 

920 

930 

940 

950 

960 

970 

999 


REM *** SNARK ... CATCH HIM WITH A WELL PLACED CIRCLE 
REM +** PEOPLE'S COMPUTER COMPANY, MENLO PARK CA 
REM *** SOME COMPUTERS NEED 'RANDOM' HEnE 
PRINT "WANT THE RULES (1**YES 0»NO>”; 

INPUT Z 

IF Z«0 THEN 510 

REM *** HERE ARE THE RULES 

PRINT 

PRINT "A SNARK IS HIDING IN A 10 BY 10 GRID LIKE THE ONE" 
PRINT "SHOWN BELOW!" 

PRINT 

PRINT " Y" 

FOR Y»9 TO 0 STEP -1 

PRINT YJ".» 

NEXT Y 
PRINT 

PRINT TAB < 6)1" 0123456789 X" 

PRINT 

PRINT "THY TO CATCH HIM. HERE'S HOW ... WHEN I ASK, YOU TYPE" 
PRINT "THE X, Y COORDINATES OF A G.iIDPOINT CIF YOU DON'T KNOW" 
PRINT "WHAT THAT MEANS, ASK SOMBOUY!) AND P.\ESS THE RETURN" 

Pit I NT "KEY. THEN, WHEN I ASK FOR ':tADIJS', YOU TYPE THE rADIU 
PRINT "OF A CIRCLE CENTERED ON THE GRIDPOINT WHOSE X,Y" 

PRINT "COORDINATES YOU UUST ENTERED. I WILL THEN TELL YOU" 
PhINT "WHETHER THE SNARK IS 'INSIDE* YOUR CI.tCLE, 'OUTSIDE'" 
PRINT "YOUR CIRCLE, OR 'ON* YOUR CIRCLE." 

PRINT 

PRINT "III IMPORTANT !!! IF YOU THINK YOU KNOW WHEitE HE IS" 
PHINT "HIDING, ENTER 0 (ZERO) AS THE RADIUS. GOOD HUNTING." 
REM HIDE THE SNARK 

LET X*INT(10*HND(0)) 

LET Y*I NT(10*RND(0)) 

PRINT 

PRINT "SNARK IS HIDING ... STAHT GUESSING!" 

REM *♦* GUESSING BEGINS 

K«1 

PRINT 

PHINT "COORDINATES") 

INPUT A,B 

LET D2»<X-A)*(X-A)+(Y-B>*<Y-R) 

PHINT "RADIUS"; 

INPUT R 

IF H «» 0 THEN 700 
IF D2-0 THEN 910 
IF D2<H*R THEN 730 
IF D2>H*R THEN 750 
IF D2-H*H THEN 770 

PHINT "SNARK IS INSIDE YOUR CIRCLE" 

GOTO 780 

PRINT "SNArtK IS OUTSIDE YOUR CIRCLE" 

GOTO 700 

PRINT "SNARK IS ON YOUR CIRCLE" 

K-K+l 
GOTO 620 

REM +** WE GOT A WINNER 
PRINT 

PHINT "YOU CAUGHT HIM IN";K;"GUESSES!!I" 

PRINT "GOOD SHOW!" 

PRINT 

PRINT "DO YOU WANT TO PLAY AGAIN <1-YES 0«NO>"; 

INPUT Z 

IF Z«1 THEN S10 
END 


REVERSE 

See May ’73 issue PCC Vol. 1, No. 5, page 5. 

Length :874 words. 

100 HEM *** REVERSE - A GAME OF SKILL 

110 HEM *** PEOPLE'S COMPUTER COMPANY, MENLO PARK CA 

130 DIM A(20 ) 

140 HEM **♦ N - NUMBER OF NUMBERS Cl THRU N) 

1S0 LET N«9 

160 PRINT "DO YOU WANT THE HULES Cl-YES 9«N0)"I 

170 INPUT.A 

160 IF A-0 THEN 210 

190 GOSUd 710 

200 hEM *** MAKE A RANDOM LIST AC 1) TO ACN) 

210 LET AC 1 )* INTC CN-1 )*rtNDC0 ) )+2 

223 FOR J<«2 TO N 

230 LET ACK)-INTCN*hNDC0))+l 

243 FOR J=1 TO K-l 

250 IF ACK)«ACJ) THEN 230 

2 60 NEXT J 

270 NEXT K 

260 HEM *** PRINT ORIGINAL LIST AND START GAME 
290 PRINT 

330 PRINT "HERE WE GO . .. THE LIST IS*" 

313 LET T«0 
320 GOSUB 610 

330 PRINT "HOW MANY SHALL I KEVErtSE"J 

340 INPUT R 

350 IF R«0 THEN 520 

363 IF R<«N THEN 390 

370 PRINT "OOPS! TOO MANY - I CAN rtEVERSE AT MOST"IN 
380 GO TO 330 
390 LET T-T+l 

400 REM ♦ ** mEVERSE R NUMBERS AND PRINT NEW LIST 
410 FOR K*1 TO INTCR/2) 

420 LET Z-ACK) 

430 LET ACKJ-ACR-K+l) 

440 LET ACH-K + D-Z 
450 NEXT K 
460 GOSUB 613 

470 REM *** CHECK FOR A WIN 
480 FOR K«l TO N 
490 IF ACKX>K THEN 333 
500 NEXT K 

519 PRINT "YOU WON IN"JTJ"MOVES!!!" 

520 PhINT 

530 PRINT "AGAIN C1-YES 0-NO)"I 

540 INPUT A 

550 IF A< >3 THEN 210 

5 60 STOP 

600 REM *** SUBROUTINE *** PRINT LIST AC 1) TO ACN) 

610 PRINT 

620 FOR K-I TO N 

630 print ackj; 

640 NEXT K 
650 PRINT 
660 PRINT 
670 KETUHN 

700 REM *** SUBROUTINE *** PRINT THE HULES 
710 PRINT 

720 PRINT "THIS IS THE GAME OF 'REVERSE*. TO WIN, ALL YOU HAVE" 
730 PhINT "TO DO IS ARRANGE THE LIST OF NUMBERS Cl THROiJGW"!NJ**>" 
740 PHINT "IN NUMERICAL ORDER KrOM LEFT TO RIGHT. 10 MOVE# YOU" 
750 PRINT "TELL ME HOW MANY NUMBERS CCOUNTING FmOM THE LEFT) TO" 
760 PRINT "REVERSE. FOr EXAMPLE, IF THE CURRENT LIST IS*" 


23451 6769 " 


6 


770 

PHINT 

780 

PHINT » 

790 

PHINT 

600 

PHINT " 

610 

PhINT 

620 

PhiN J " 

M 30 

PH INI 

640 

PHINT " 

850 

PHINT 

6 60 

PhINT •• 

6 70 

PhINT 

HH0 

PHINT " 

670 

PhINT " 

9 MM 

PH 1 NT 

910 

HKTUHN 

999 

KNn 


AND YOU REVERSE 4, THE RESULT WILL BE*" 

S 4 3 1 (, */ H V" 

NOW, IF YOU REVERSE 5, YOU WIN!" 

1 2 3 4 5 6 7 6 9" 

NO liOtJHT YOU WILL LIKE THIS GAME- OF SKILL* BUT" 
IF YOU WANT TO (JUIT, REVERSE 0 (ZERO)." 


BUTTON 


Length: 909 words. 

10 REM *** BUTTON, BUTTON, WHO'S GOT THE BUTTON? *** 

15 REM *** WRITTEN BY - DAVE KAUFMAN - AUGUST 1973 *** 

20 REM *** PEOPLE'S COMPUTER COMPANY, MENLO PARK, CALIFORNIA 
25 REM ****************************** rem 
30 REM FNM COMPUTES X MODULAR 7 

35 REM FNN COMPUTES THE NEXT ONE TO GET THE BUTTON 
40 DEF FNMCX>«CX=0)*7 + (X<=7)*><: + (X=8)*1 
45 DEF FNNCX)-FNMCX+SGNCRNDC0)-.5)> 

50 GOSUB 1000 

100 REM *** GAME STARTS HERE *** 

110 REM B THE ONE WHO HAS THE BUTTON 

120 REM L THE LAST ONE WHO HAD IT 

130 B-INT CRNDC 0)*6)*2 

140 L-8 

150 PRINT 

160 PRINT 

170 REM *** GUESSING STARTS HERE *** 

180 REM G PLAYER'S GUESS 

190 PRINT "WHO DO YOU GUESS HAS IT"; 

200 INPUT G 
210 IF G-0 THEN 440 
220 IF G-B THEN 430 
230 IF G«L THEN 360 

240 IF G-FNMCB*!) OR G-FNMCB-1) THEN 340 
250 IF G»0 AND G<8 THEN 290 

260 PRINT "SILLY - THERE'S NO ONE HERE BY THAT NUMBER" 

270 PRINT "TRY AGAIN ..." 

280 GOTO 190 

290 PRINT GJ"i 'WHO, ME?'" 

300 PRINT 
310 PRINT 

320 PRINT "WHOEVER HAS IT, KEEPS IT" 

330 GOTO 170 

340 PRINT G;"l 'MY NEIGHBOR HAS IT'" 

350 GOTO 370 

360 PRINT G;"i 'I HAD IT LAST TIME'" 

370 L-B 
380 B-FNNCB) 

390 PRINT 
400 PRINT 

410 PRINT "...BUT WHOEVER HAS IT, PASSES IT" 

420 GOTO 170 

430 PRINT G;"i 'RIGHT YOU ARE - LUCKY!'" 

440 REM *** AGAIN? *** 

450 PRINT 


460 

PRINT "AGAIN (1-YES 

# 0-NO)"J 


470 

INPUT G 



480 

IF G-0 THEN 510 



490 

PRINT "*** NEW GAME 



500 

GOTO 100 



510 

REM *** END PROGRAM 

*** 


520 

STOP 



1000 

REM -** THE INTRO 

*** 


1010 

PRINT 



1020 

PRINT 



1030 

PRINT "BUTTON# BUTTON# VHO•S GOT 

THE BUTTON?" 

1040 

PRINT 



1050 

PRINT 



1060 

PRINT "SEVEN FRIENDS ARE SITTING 

IN A CIRCLE" 

1070 

PRINT "AND YOU'RE 

IN THE CENTER" 


1080 

PRINT 



1090 

PRINT 



1100 

PRINT " 1" 



1110 

PRINT 



1120 

PRINT " 7 2' 



1130 

PRINT 



1140 

PRINT " YOU'RE" 



1150 

PRINT "6 IT 

3" 


1160 

PRINT 



1170 

PRINT " 5 4" 



1180 

PRINT 



1190 

PRINT 



1200 

PRINT "SOMEONE HAS 

THE BUTTON AND 

YOU HAVE TO GUESS WHO' 

1210 

PRINT 



1220 

PRINT "HE CAN PASS 

THE BUTTON (IF 

HE WANTS TO)" 

1230 

PRINT "BUT ONLY TO 

SOMEONE HE'S SITTING NEXT TO" 

1240 

PRINT 



1250 

PRINT "IF YOU WANT 

TO STOP# TYPE 

0 (ZERO)" 

1260 

PRINT 



1270 

PRINT "GOOD LUCK 

! 1 I" 


1280 

RETURN 



1290 

END 




CHOMP 

See Feb.’73 issue PCC Vol. 1, No. 3, page 9. 

Length: 1153 words. 

li) HEM *** THE GAME Oh CHOMP *** 

ai UEM ♦** CQPYiil 6HT* PEOPLE *S COMPUTER COMPANY *** 

30 HEM *♦* 1921 MtNALTO AVE•* MENLO PARK# CA. 94025 **♦ 

AO HEM ♦** BASED ON AN AHTICLE IN SCIENTIFIC AMERICAN# JAN 1973 *** 
110 PRINT "THIS IS THE GAME Oh CHOMP (SCIENTIFIC AMERICAN# JAN 1973) 
120 PKINT 

130 PKINT "WANT THE RULES (1-YES# 0«NO!>"; 

140 INPUT R 

150 IF H-0 THEN 340 

160 F-l 

170 R-5 

180 C-7 

190 PRINT "CHOMP IS FOR 1 OR MOkE PLAYERS (HUMANS ONLY)." 

200 PRINT 

210 PRINT "HERE'S HOW A BOARD LOOKS (THIS ONE IS 5 BY 7)1" 

220 G0SU9 540 
230 PRINT 

24t0 PRINT "THE BOARD IS A BIG COOKIE - R ROWS HIGH AND C COLUMNS" 

250 PRINT "WIDE. YO'J INPUT rt AND C AT THE STA:-.T . IN THE UPPF.h LEFT" 
260 PRINT "CORNExi OF THE COOKIE IS A POISON SUJARE (P). THE ONE WHO" 
270 PRINT "CHOMPS THE POISON SQUARE LOSES. TO TAKE A CHOMP# TYPE THE 
280 PRINT "ROW AND COLUMN OF ONE OF THE SQUARES ON THE COOKIE." 

290 PRINT "ALL OF THE SOUARES BELOW AND TO THE .RIGHT OF THAI SQUARE" 
300 PRINT "(INCLUDING THAT SQUARE# TOO) DISAPPEAR -- CHOMP!!" 

310 PRINT "NO FAIR CHOMPING SQUARES THAT HAVE ALhEADY BEEN CHOMrED#" 
320 PRINT "0(1 THAT ARE OUTSIDE THE OmIGINAL DIMENSIONS OF THE COOKIE 


330 PRINT 

340 PRINT "HERE WE GO..." 

350 DIM AC 10# 10] 

360 F-0 

370 FOR*I*1 TO 10 

372 FOR J-l TO 10 

375 LET ACI#J3-0 
377 NEXT J 

379 NEXT I 

380 PRINT 

390 PRINT "HOW MANY PLAYERS"; 

400 INPUT P 

410 11-0 

420 PkINT "HOW MANY ROWS") 

430 INPUT R 

440 IF K «» 9 THEN 479 

450 PRINT "TOO MANY HOWS (9 IS MAXIMUM). NOW# "i 
460 GOTO 420 

470 PRINT "HOW MANY COLUMNS"; 

480 INPUT C 

490 IF C <= 9 THEN 530 

500 PRINT "TOO MANY COLUMNS (9 IS MAXIMUM). NOW# "; 

510 GOTO 470 
530 PRINT 
540 FOR 1-1 TO R 
550 FOR J-i TO C 
560 AC I#J3-1 
570 NEXT J 
580 NEXT I 
590 AC1#13--1 
600 HEM PRINT THE ROAhD 
610 PKINT 

620 PRINT TAB(7)l"i 23456789" 

630 FOu 1-1 TO R 
640 PRINT i;tab(7>; 

650 FOR J-l TO C 
660 IF ACI,J]«-1 THEN 700 
670 IF AC I# J3-0 THEN 720 
680 PRINT "+ "; 

690 GOTO 710 
700 PRINT "P "; 

710 NEXT J 
720 PRINT 
730 NEXT I 
740 PRINT 

750 Ih h-0 THEN 770 
760 RETURN 

770 REM GET CHOMPS FOR EACH PLAYER IN TURN 
780 LET I I-I 1*1 
790 LET P1 «11 -1 NT ( I 1 /P ) *P 
800 IF PI <> 0 THEN 820 
810 Pl-P 

820 PRINT "PLAYER ";P1 

830 PRINT "COORDINATES OF CHOMP (ROW#COLUMN)"; 

840 INPUT HI#C1 
850 IF HI<1 THEN 920 
860 IF HI>R THEN 920 
870 IF Cl«l THEN 920 
880 IF C1»C THEN 920 
890 IF ACR1#C13-0 THEN 920 
900 IF ACR1,C13 —1 THEN 1010 
910 GOTO 940 

920 PRINT "NO FAIR. YOU'RE TRYING TO CHOMP ON Ex'IPTY SPACE!" 

930 GOTO 820 

940 FOR I -HI TO R 

950 FOR J-Cl TO C 

960 AC I# J3-0 

970 NEXT J 

980 NEXT I 


990 GOTO 610 

1000 HEM END OF GAME DETECTED IN LINE 900 
1010 PHINT "YOU LOSE* PLAYErt ";Pl 
1020 PHINT 

1030 PHINT "AGAIN <1«YES; 0-NO!)"i 
1040 INPUT H 
1050 IF H-l THEN 340 
10 60 END 

TAXMAN 

See Sept.’73 issue PCC Vol. 2, No. 1, pages 6,7. 

See Nov. ’73 issue PCC Vol. 2, No. 2, page 7. 

See Jan. ’74 issue PCC Vol. 2, No. 3, page 8. 

Length: 1739 words. 

100 PnlNT 
102 PHINT 

104 PHINT "HI* I'M THE TAXMAN." 

106 PHINT "DO YOU WANT THE REGULATIONS (1=YES*0-NO)"i 

108 INPUT h 

110 IF H-1 THEN 900 

120 REM *** INITIALISATION 

122 GOSUB 800 

124 HEM *** THE HUMAN TAKES A NUMBER 
126 GOSUB 500 

128 HEM *** COMPUTE THE HUMAN'S AND TAXMAN'S TOTALS 
130 GOSUB 5 70 

132 HEM *** PRINT THE NEW LIST 
134 GOSUB 600 

136 HEM *** CHECK IF ANY NUMBERS STILL HAVE FACTORS 

138 GOSUB 650 

140 IF M»1 THEN 126 

142 HEM **+ FIND THE WINNER 

144 GOSUB 700 

146 REM *** AGAIN? 

148 GOTO 750 

49 6 HEM 

497 HEM *** THE HUMAN MOVES 

498 HEM 
500 PxiINT 
502 PHINT 

504 PHINT "YOU TAKE"; 

50 6 INPUT K 

508 LET K-INT(K) 

510 IF K <- 0 THEN 750 
512 IK K <- N THEN 518 

514 PHINT K;"IS NOT IN THE LIST -- THY AGAIN." 

516 GOTO 502 

518 IF LCK3-0 THEN 514 

520 HEM FIND ALL THE FACTORS 

522 IF K»1 THEN 530 

524 PHINT "THERE ARE NO FACTORS OF"JKJ"FOK ME." 

526 PHINT "ARE YOU TRYING TO SHORT-CHANGE THE TAXMAN?" 

528 GOTO 502 

530 LET M-0 

532 FOR I-l TO K/2 

534 IF LCI3-0 THEN 544 

536 IF K <> I * I NT < K /1 ) THEN 544 

538 LET M-M-H 

540 LET TCM3-I 

542 LET LCI 3-0 

544 NEXT I 

546 REM CHECK WHETHER THERE WERE ANY FACTORS 
548 IF M-0 THEN 524 


550 

LET LCK3-0 



552 

RETURN 



566 

REM 



567 

REM *** COMPUTE THE HUMAN'S 

AND 

TAXMAN'S TOTALS 

568 

REM 



570 

LET Y-Y+K 



572 

PRINT "YOUR TOTAL IS";Y 



574 

PRINT "I GET"; 



57 6 

FOR 1-1 TO M 



578 

PRINT TCI3; 



580 

LET Z-Z+TCI3 



582 

NEXT I 



584 

PRINT 



586 

PRINT "MY TOTAL IS"IZ 



588 

RETURN 



596 

REM 



597 

REM *** PRINT THE NEW LIST 



598 

REM 



600 

PRINT 



602 

PRINT "NEW LISTl"; 



604 

LET M-0 



606 

FOR 1-1 TO N 



608 

IF LCI3-0 THEN 614 



610 

PRINT i; 



612 

LET K-l 



614 

NEXT I 



616 

RETURN 



646 

REM 



647 

REM *** CHECK IF ANY NUM3ERS STILL HAVE FAfcTOr.S 

648 

HEM 



649 

REM CHECK IF THE LIST IS EMPTY 


660 

IF M-0 THEN 690 



662 

FOR I-N TO 4 STEP -1 



664 

FOR J-2 TO 1/2 



656 

IF. LCJ3-0 THEN 664 



668 

IF I <> J*INT<I/J> THEN 664 



660 

LET M=1 



662 

RETURN 



664 

NEXT J 



666 

NEXT I 



666 

REM THE TAXMAN GETS THE REST 

OF 

THE NUMBERS 

670 

PRINT 



672 

PRINT "I GET "; 



674 

FOR 1-1 TO N 



676 

IF LCI3-0 THEN 682 



678 

PRINT IJ 



680 

LET Z-Z+I 



682 

NEXT I 



684 

PRINT " BECAUSE NO FACTORS OF 

ANY 

NUMBER ARE LEFT 

686 

PRINT "MY TOTAL IS"iZ 



668 

LET M-0 



690 

RETURN 



696 

REM 



697 

REM *** FIND THE WINNER 



698 

REM 



700 

PRINT 



702 

IF Z>Y THEN 708 



734 

print "you m ;y;" taxman";z; m 


YOU WIN !!!" 

706 

RETURN 



738 

print "taxman"; z; M you m ;y; m 


THE TAXMAN WINS 

710 

RETURN 



746 

REM 



747 

REM *** AGAIN? 



748 

REM 



750 

PRINT 



752 

PRINT 



754 

PRINT "AGAIN <1-YES*0-NO>"; 



756 

INPUT R 



758 

IF R-0 THEN 999 




760 GOTO 122 

796 REM 

797 REM *** INITIALIZATION 

798 REM 
800 PRINT 

802 PRINT "HO'* MANY NUMBERS DO YOU WANT IN THE LIST*.*! 

804 INPUT N 
806 LET N-INT(N) 

808 IF N <■ 0 THEN 999 
810 IF N <■ 50 THEN 816 

812 PRINT "AT THIS TIME# REGULATIONS ALLOW A MAXIMUM OF 50 NUMBE..:? •" 

814 GOTO 800 

816 DIM LC50 3#TC10 3 

818 LET Y«0 

820 LET Z-0 

822 PRINT 

824 PRINT "THE LIST ISl”) 

826 FOR I-l TO N 

828 PRINT IJ 

830 LET LCID-1 

832 NEXT I 

834 IF N>1 THEN 844 

836 PRINT 

838 PRINT "HOW VERY GENEROUS OF YOU TO FORFEIT ALL TO THE TAXMAN." 

840 PRINT "TAXMAN 1 YOU 0 THE TAXMAN WINS." 

842 GOTO 750 
844 RETURN 

896 REM 

897 REM *♦* INSTRUCTIONS 

898 REM 

900 PRINT 

901 PHINT "YOU TRY TO BEAT THE TAXMAN." 

90 2 PR I NT 

904 PRINT "WE START WITH A LIST OF WHOLE NUMBERS IN NUMERICAL" 

906 PRINT "ORDER (YOU DECIDE HOW MANY)." 

910 PRINT "YOU TAKE A NUMRER FROM THE LIST — THE TAXMAN GETS" 

912 PRINT "ALL THE FACTORS OF YOUR NUMBER THAT ARE STILL LEFT." 

914 PRINT "YOUR NUMBER AND.ALL ITS FACTORS ARE THEN DELETED" 

916 PRINT "FROM THE LIST." 

920 PRINT "FOR EXAMPLE# SUPPOSE YOU WANT 10 NUMBERS TO BE IN LIST, 

9e2 PRINT "THEN THE LIST WOULD BEI 1 2 3 4 5 6 7 8 9 10 

go 4 PRINT 

926 PRINT "IF YOU TOOK 8# THE TAXMAN WOULD GET 1# 2# AND 4" 

928 PRINT "AND THE NEW LIST WOULD BE* 3 5 6 7 9 10" 

M2 PRINT "THE TAXMAN MUST GET SOMETHING EVERY TIME SO YOU CAN" 

934 PRINT "ONLY PICK A NUMBER THAT HAS FACTORS LEFT." 

930 SR "WHEN NONE OF THE REMAINING NUMBERS HAS ANY FACTORS#" 

940 PRINT "THE TAXMAN GETS THEM!!" 

944 PRINT "YOUR SCORE IS THE SUM OF THE NUMBERS YOU TAKE." 

946 PRINT "IF YOU WANT TO GIVE UP# TAKE 0." 

948 PRINT "GOOD LUCK!" 

950 GOTO 122 
999 END 


SUNSIGN 


See Nov/73, issue PCC Vol. 2, No. 2, page 17. 
Length: 1401 words. 


1 

2 

3 

4 
10 
20 
30 
100 
105 
110 
115 
120 
125 
130 
132 
134 
136 
138 
140 
142 
144 
146 
148 
150 
152 
154 
156 
158 
160 
200 
205 
210 
215 


230 

235 

240 

245 

250 

255 

260 

265 

270 

275 

280 

285 

290 

295 

300 

305 

310 

315 

320 

325 

400 

405 

410 

415 

420 

<C5 

430 

435 


REM *** SUN SIGN DESIGN - PEOPLE’S COMPUTER CENTER 
REM *** BOX 310 MENLO PARK CALIFORNIA 94025 +** 

REM *** PROGRAMMER I JANE WOOD *** 

REM 

DIM ASC72 D#BSC263 
BS«"ABCDEFGHIJKLMNOPQRSTUVWXYZ" 

REM 

REM +** INSTRUCTIONS *** 

PRINT 

PRINT "DO YOU NEED INSTRUCTIONS ") 

GOSUB 4000 
PRINT 

IF X-0 THEN 200 

PRINT "THIS PROGRAM PRINTS DESIGNS BASED ON A PERSON’S 
PRINT "NAME AND SUN SIGN. HERE IS A TABLE OF SUN SIGNS 
PRINT 

MAR 21-APR 20 
APR 21-MAY 21 
MAY 22-JUN 21 
JUN 22-JUL 23 
JUL 24-AUG 23 
AUG 24-SEP 23 


LIBRA SEP 24-i 
SCORPIO OCT 24-i 
SAGITTARIUS NOV P.3-! 
CAPRICORN DEC 22- 
AQUAril US JAN 21- 
PISCES FEB 20 


PRINT "ARIES 
PRINT "TAURUS 
PRINT "GEMINI 
PRINT "CANCER 
PRINT "LEO 
PRINT "VIRGO 
PRINT 

PRINT "THE PROGRAM ASKS FOR A FImST# MIDDLE AND LAST" 
PRINT "NAME. IF YOU DON’T HAVE A MIDDLE NAME TYPE A" 
PRINT "CARRIAGE uETURN. THE PROGRAM ONLY PAYS ATTEN-" 
PRINT "TION TO LETTERS# AND IGNORES ALL OTHEn TELE-" 

Pm I NT "TYPE CHARACTERS. HEnE WE GO." 

PRINT 

«EM **+ GET SThING PARAMETERS *** 

PRINT 

PRINT 

PRINT "FIRST NAME "1 

GOSUB 3000 

GOSUR 1000 

V0-x 

PHINT 

PRINT "MIDDLE NAME "; . 

GOSUB 3000 
GOSUB 1000 
V2-X 
PRINT 

PRINT "LAST NAME "J 

GOSUR 3000 

GOSUB 1000 

V4-X 

PHINT 

PRINT "SUN SIGN "j 

GOSUB 3000 

GOSUB 1000 

V6-X 

PRINT 

PRINT 

PRINT 

REM 

REM *** COMPUTE NUMERIC PARAMETERS **♦ 

V»V0 

Q«9 

GOSUB 2000 

Vl-M 

V-V2 

GOSUB 2000 
V3-M 


OCT 33" 
NOV 22" 
DEC 21" 
JAN 20" 
FEB 19" 
MAh 20" 


440 V-V4 

445 vJ-7 

450 GOSUB 2000 

455 V 5-M 

460 V-V6 

465 Q-5 

470 G0SJ3 2000 

475 V9-M 

480 O0 

485 HEM 

500 REM *** PICTURE PRINTING LOOP *** 

505 FOR U--CV9+3) TO V9+2 
510 AJ-” 

515 V0-V0-J 

520 V2-V2-U 

525 K0-2*V5+2 

530 REM 

535 REM *** COMPUTE ROW *** 

540 FOR K--K0 TO K0 

545 Kl-KO+K+18 

550 V0«V0-K*V5 

555 V-V0 

560 Q-9 

565 GOSUB 2030 

570 V7-M 

575 V2«V2-K*V3 

580 V-V2 

585 Q * 7 

590 GOSUB 2000 

595 V8-M 

«)0 IF K <> K0 THEN 610 
605 V8--1 

610 GOTO SGN(V8-V7>+2 OF 625,615,635 
615 AS CK1, K1 3-"0" 

eee goto 640 

C25 ASCKl,K1 3“** ” 

630 GOTO 645 
635 ASCK1,K13-"*" 

640 C-C + l 
645 NEXT K 
660 REM 

655 REM **♦ PRINT ROW *** 

660 K-l 

665 IF C-0 THEN 695 

670 PRINT AS CK,K3J 

675 IF ASCK,K3>" M THEN 685 

680 C-C-l 

685 K-K+I 

690 IF K «■ LEN(AS) THEN 665 
695 PRINT 
700 NEXT J 

800 REM ♦ ** ASK FOR ENCORE *** 

80 5 PRINT 
810 PRINT 
815 PRINT 
820 PRINT 

825 PRINT "WOULD YOU LIKE TO DO ANOTHER ONE "1 

830 GOSUB 4000 

835 IF X-l THEN 200 

840 STOP 

845 REM 

1000 REM *♦* CONVERT INPUT STRING TO NUMBER *** 
1010 X»G 
1020 J-l 

1030 IF J>LEN(AS) THEN 1120 
1340 K-l 

1050 IF K>26 THEN 1100 

1060 IF ASCJ,J3-BSCK,K3 THEN 1090 

10 70 K-K+l 


1080 GOTO 1050 
1090 X-X+K+192 

1100 J-J+l 
1110 GOTO 1033 
1120 RETURN 
1130 REM 

2003 REM *♦* MODULOUS FUNCTION *** 
2010 K-V - INT ( V/Q ) *Q + 1 
20 2 3 RETURN 
20 30 REM 

3003 HEM FETCH STRING +** 

3010 PRINT "7 "i 
3020 ENTER 255,1,AS 
3030 IF T--256 THEN 3020 
3040 PRINT 
3050 KETUnN 
30 60 REM 

4000 REM *** YES OR NO FETCH *** 

40 10 X-0 

4020 INPUT AS 

4030 IF AS-"NO" THEN 40 90 

40 4 0 X-l 

4050 IF AS-"YES" THEN 4090 

4060 PRINT "PLEASE ANSWER YES OR NO 

4070 PRINT "ANSWER "J 

4080 GOTO 4010 

4090 RETURN 

4100 REM 

9999 END 



TREE SUBROUTINES 

See Jan.’74 issue PCC Vol. 2, No. 3, page 21. 
Length: 2225 words. 


7400 

REM 

7402 

REM 

7404 

REM 

7406 

REM 

7408 

REM 

7410 

REM 

7412 

REM 

7414 

REM 

7416 

REM 

7418 

REM 

7420 

REM 

7422 

REM 

7424 

REM 

7426 

REM 

7428 

REM 

743 0 

REM 

743 2 

REM 

7434 

REM 

7436 

REM 

7438 

REM 

7440 

REM 

7442 

REM 

7444 

REM 

7446 

REM 

7448 

REM 

7450 

REM 

7452 

REM 

7454 

REM 

7480 

DIM 

7482 

DEF 

7484 

DEF 


*** TREE SUBROUTINES BEGIN *•* 

SACRED NAMESl N(1 27),P<385),LC99>,N9,P1,P2,P3,P4,P5,P9, 

LI,FND,FNN«FNU 
ARGUMENT! V1,V2,N1,D1 

N1 IS NAME OF CURRENT NODE (FOR TOP NODE, Nl-1> 

D1 IS NAME OF DAUGHTER NODE 

NODE NAMES CAN BE ANY NUMBER EXCEPT 9999 

VI- 0 INITIALIZE TREE! MAKE #1 THE CURRENT NODE 

1 ADD D1 AS NEXT DAUGHTER TO CURRENT NODE 

2 CUT D1 OFF FROM CURRENT NODE (BUT LEAVE IT AND 
ALL BELOW IT) 

3 PRUNE D1 (AND ALL BELOW IT) FROM TREE 

4 GO UP FROM N1 TO MOTHER NODE (UNLESS AT TOP) 

5 GO UP FROM N1 THE WAY YOU CAME (UNLESS AT TOP) 

6 GO DOWN TO D1 FROM CURRENT NODE (IF LEGAL) 

7 RETURN WITH NEXT DAUGHTER NODE (AFTER D1) IN D1 
IF NO MORE, D1-9999 

IF D1 ISN'T A DAUGHTER OF CURRENT NODE, RETURN WITH 
FIRST DAUGHTER NODE 

8 RESET CURRENT NODE TO Dl, WHEREVER IT IS IN TREE 

V2- 2 INSTRUCTION CARRIED OUT, BUT Dl IS A NEV r NODE NAME 

1 INSTRUCTION CARRIED OUT 
-1 CANNOT MOVE UP (OR DOWN) BECAUSE ON TOP (BOTTOM) 

-2 MORE THAN 127 NODES 
-3 TOO MANY CONNECTIONS 
-4 Dl IS NOT A NODE NAME 

NC1271,PC3853,LC993 
FNP(X)-INT(PCX3/512) 

FNN(X)-PCX]-INT(PCX3/512)*5l2 


7500 

KIM 444ENTHY point 

750 5 

V2-1 

7M0 

GOSUH VI 4 I Of 7525; 

751 5 

Nl -NlPI ) 

7520 

HE TURN 

752 5 

HEM 444 V|«0 444 

752 6 

HEM *44 INITIALISE 

7530 

Nil )»l 

7531 

FOR Pl»2 TO 127 

7532 

NlPI ) •9999 

7533 

NEXT PI 

7535 

N9-2 

7540 

FOR PI-2 TO 384 

7545 

PIPIJ«PI♦! 

7550 

NEXT PI 

7551 

P £ 1)«0 

7552 

P £ 1273-0 

7553 

P £ 385 3 *0 

7555 

PI -1 

7557 

P2-I 

WA 

rn 23 

7570 

return , 

7600 

4-4 VI *1 4*4 

7601 

REM 444 ADD Dl AS 

7602 

GOSUB 8400 

760 4 

IF P2»0 THEN 7622 


TfcCfe E.F <Z> THEN 'Vo\X 

7610 RETURN 
7612 V2-2 
7614 N£ N91*01 
7618 P2«N9 

7620 N9-PIN93 

7621 P£P2)«0 

7622 P3-P1 

7624 IF FNN(P3) r 0 THEN 7632 
7626 P3«FNN(P3> 

7628 IF FNP(P3)=P2 THEN 7646 

7630 GOTO 7624 

7632 IF P9 <> 0 THEN 7638 

7634 V2*-3 

7636 RETURN 

7638 PCP33»PIP3J*P9 

7640 P3»P9 

7642 P9«PIP9J 

7A44 PtP3J*P2*512 

7646 IF FNP<P2> «» ° THEN 7650 

7648 P[P2J»PIP2)*P1*SI2 

7650 RETURN 

CUT^Ol ^OFF FROM CURRENT NODE <8UT LEAVE IT 

GOSUB 8400 
IF V2«0 THEN 7740 
P3=P1 
P4«P3 
P3-FNNCP3) 

IF FNP(P3>“P2 THEN 7718 
IF P3= l00 THEN 7740 
GOTO 7708 

IF FNP<P2> «> pl THEN 773 
P[P2J*PCP2J-P»* 512 
PlP4JePtP4J♦FNN<P3>- p3 
PIP33-P9 
P9*P3 
RETURN 

IS .HO ALL OLLO. IT 

GOSUB 3400 


7700 

7701 

7702 
7704 
7706 
7708 
7710 
7712 
7714 
771 6 
7718 
7 720 
7734 
7736 
7738 
7 740 

7800 

7801 

7802 


< ALL Btuv, 


780 4 IF V2 <0 THEN 7899 
7806 rtEM • ADD TO FREE LISTS ALL N AND P ENTRIES IN SUBTREE 
7808 IF FNN(P2) «> 0 THEN 7818 
7810 N£P23»9999 

7812 PtP2J«N9 
7814 N9-P2 

7816 GOTO 7870 
7818 PIP2 1 *FNN(P2) 

7820 N£P23=9999 

7822 P3-FNNCP2) 

7823 IF P3*0 THEN 7856 

7824 P4*FNP(P3> 

7826 IF NIP43-9999 THEN 7844 

7828 IF FNP<P4>»0 THEN 7838 

7830 REM DROP DOWN TO DAUGHTER 

7832 PCP4l»P£P4j♦<P2-FNP(P4 )>*512 

7834 P2-P4 

7836 GOTO 7820 

7838 N £P4l*9999 

7840 P£P43»N9 

7842 N9*P4 

7844 REM MOVE TO NEXT DAUGHTER 

7845 P4-FNNCP3) 

7846 IF P4*0 THEN 7851 

7847 P£P3J«P£P41 

7848 P£P43-P9 

7849 P 9*P 4 

7850 GOTO 7324 

7851 P£P3J«P9 

7852 P9*P3 

7856 REM GO UP TO MOTHER NODE 
7858 P3«FNP(P2) 

7860 P£P23-N9 

7862 N9-P2 

7864 P2«P3 

7866 IF P2 <> 0 THEN 7822 

7870 REM • DELETE ALL REFERENCES TO PRUNED NOOES 

7872 FOR P2*1 TO 127 

7874 IF N£P2]»9999 THEN 7898 

7876 HEM LOOK AT ALL DAUGHTERS 

7678 P3*P2 

7880 P4-P3 

7882 P3-FNN <P3) 

7884 IF P3*0 THEN 7898 

7886 IF N £ FNP <P3 ) 3 <> 9999 THEN 7880 

7888 PIP 43«P£P43♦FNN(P3 >-FNNCP 4) 

7890 PCP3 J -P9 
7892 P9-P3 

7894 P3-FNN(P4> 

7896 GOTO 7884 

7898 NEXT P2 

7899 RETURN 

7900 REM VI-4 ••• 

7901 Rem GO UP FROM N1 TO ITS MOTHER NODE (UNLESS AT TOP) 

7905 IF FNP<PI)-0 THEN 7935 

7910 P2-PI 
7915 Dl-NI 
7920 Pl-FNP(PI) 

7925 LIXLI-I ) MAX I 
7930 RETURN 
7935 V2--1 

7940 RETURN 

8000 HEM 44* VI■5 *44 

8001 KEM 444 GO UP THE WAY YOU CAME (UNLESS AT TOP) 

8005 IF Lt»l THEN 80SJ 

8010 V2--I 

8015 KETURN 

8020 L1-LI -I 

8021 IF NCL£L1))4?99? THEN 8010 



8022 P2-P1 

8025 P1-LCLI3 
8027 Dl-Nl 
8030 RETURN 

8100 REM *** Vl-6 *** 

8101 REM *** GO DOWN TO D1 FROM CURRENT NODE (IF LEGAL) 

8115 GOSUB 8400 

8120 IF V2«0 THEN 8150 
8125 P3-PI 
8127 P3«FNN(P3) 

8130 IF P3-0 THEN 8145 

8135 IF FNP(P3)«P2 THEN 8155 

8140 GOTO 8127 

8145 V2--1 

8150 RETURN 

8155 LCLU-Pl 

8160 P1-P2 

8165 Ll-Ll+1 

8170 RETURN 

8200 REM *** V1 *7 ** + 

8201 REM *** RETURN WITH NEXT DAUGHTER NODE IN D1 (IF NO MORE, 01 »***») 
8205 IF FNN(Pl>-0 THEN 8275 

8210 GOSUB 8400 
8220 P3-P1 

8225 P3-FNN(P3> 

8230 IF P3*0 THEN 8245 
8235 IF FNP(P3)-P2 THEN 62S0 
8240 GOTO 8225 
8245 P3-P1 

8250 P2«FNN(P3> 

8255 IF P2-0 THEN 8275 
8257 P2-FNPCP2) 

8260 DI-NCP2) 

8265 RETURN 
8275 Dl-9999 

8280 RETURN 

8300 REM «** VI-8 *«* 

8301 REM *** RESET TO NODE Di 
8310 GOSUB 8400 

8320 IF V2<0 THEN 8350 
8330 PI-P2 
8340 LI-1 
8350 RETURN 

8400 REM FIND POINTER FOR DI 

8402 IF Dl-9999 THEN 8440 

8403 IF P2<1 OR P2»127 THEN 8406 

8404 IF NCP21-D1 THEN 8460 

8406 IF DI<l OR Dl»127 THEN 8414 

8408 IF NCD13 <» DI THEN 8414 

8410 P2-D1 

8412 RETURN 

8414 FOR P2-l TO 127 

8420 IF NCP21-D1 THEN 6460 

8430 NEXT P2 

8440 V2--4 

8450 P2--I 

8460 RETURN 


CAVES1 12 

See May *73 issue PCC Vol. 1, No. 5, page 4. 

Length: 1365 words. 

10 Nl-Dl-l 

20 REM *** CAVES 1 *** 

30 REM *** PROGRAM MAKES A SET OF LINKED ROOMS FOR YOU TO EXPLORE 
40 REM *** PROGRAMMER - DAVID KAUFMAN 

50 G-l 
60 G2-1 

70 PRINT "WELCOME TO THE CAVES" 

80 PRINT 

90 PRINT "IS THIS YOUR FIRST VISIT (l-YES# 0-NO)"; 

100 INPUT X 

110 IF X-l THEM 170 

120 PRINT 

130 PRINT "HOW HARD SHOULD I MAKE THE CAVES?" 

140 PRINT" 1-USUAL/ 2-HARDER# 3-!!! "; 

150 INPUT G 

160 G-ABS(G) MIN 3 

170 Vl-0 

180 GOSUB 7500 

190 R-2 

200 FOR 1-1 TO 4 
210 GOSUB 1360 
220 GOSUB 1500 
230 FOR J-l TO G-l 
240 GOSUB 1450 
250 GOSUB 1500 
260 NEXT J 
270 NEXT I 
280 W-R-l 

290 IF G2>1 THEN 520 
300 PRINT 

310 PRINT "DO YOU WANT AN INTRODUCTION (1-YES# 0-NO)"; 

320 INPUT X 

330 IF X-0 THEN 520 

340 PRINT 

350 PRINT " IMAGINE YOURSELF AN EXPLORER OF THE FAMOUS" 

360 PRINT "DUZZLEDORF CAVES. YOU’VE BEEN UNDERGROUND" 

370 PRINT "FOR DAYS# TRIPPING THROUGH THE CAVERNS AND" 

380 PRINT "TUNNELS. UNFORTUNATELY# YOU’RE LOST# AND" 

390 PRINT "YOUR FOOD HAS RUN OUT." 

400 PRINT 

410 PRINT " THERE IS ONLY ONE PATH OUT. SEE IF YOU" 

420 PRINT "CAN FIND IT." 

430 PRINT 

440 PRINT " WHEN I TYPE A ’?•# YOU GIVE ME THE NUMBER" 

450 PRINT "OF THE CAVERN YOU WANT TO GO TO. LIKE THISt" 

460 PRINT 

470 PRINT "WHERE NEXT? 7" 

480 PRINT 

490 PRINT "ADVICE* MAKE A MAP AS YOU GO - IN THE HARDER CAVES" 

500 PRINT " YOU SOMETIMES HAVE TO GO BACK AND TRY ANOTHER" 

510 PRINT " WAY. GOOD LUCKI" 

520 DI■1 
530 VI-8 
540 GOSUB 7500 
550 X-9999 

560 PRINT 

570 PRINT "YOU’RE IN CAVERM #";N1 

580 Dl-9999 

590 VI-7 

600 FOR I-l TO 3 

610 GOSUB 7S00 

620 PRINT "#";di; 

630 IF D1>W THEN 660 


640 NEXT I 

650 IF Nl-1 THEN 720 

660 VI-4 

670 GOSUB 7500 

680 PRINT "#"!Nl! 

690 X-N1 
700 VI»6 
710 GOSUB 7500 

720 PRINT "ARE WHERE YOU CAN GO" 

730 PRINT "WHERE NEXT"; 

740 INPUT D1 

750 IF Dl-Nl THEN 730 

760 IF 01 <> X THEN 800 

770 VI-4 

780 GOSUB 7500 

790 GOTO 560 

800 VI-6 

810 GOSUB 7500 

820 IF V2»0 THEN 850 

830 PRINT "ILLEGAL MOVE" 

840 GOTO 730 

850 IF Nl-W THEN 940 

860 Dl-9999 

870 VI-7 

880 GOSUB 7500 

890 IF D1 <> 9999 THEN 560 

900 PRINT "DEADEND" 

910 Vl-4 
920 GOSUB 7500 
930 GOTO 730 
940 PRINT 
950 PRINT 

960 PRINT TAB<10>!"11t SUNLIGHT 11!" 

970 PRINT 

'980 PRINT TAB<10)i"!l! FRESH AIR II!" 

990 PRINT 

1000 PRINT TABU 0>1"... REPORTERS ..." 

1010 PRINT 
1020 PRINT 

1030 PRINT "WELL# AT LEAST YOU’RE OUT" 

1040 IF G»1 THEN 1100 
1050 PRINT 

1060 PRINT "CONGRATULATIONS# INTREPID EXPLORER" 

1070 PRINT "OF THE FEARSOME CAVES. IF YOU WANT TO" 

1080 PRINT "EXPLORE AGAIN# YOU CAN CHOOSE A HARDER SET" 
1090 PRINT "OF CAVES OR ANOTHER ONE JUST AS DIFFICULT" 
1100 PRINT 

1110 PRINT "AGAIN (l-YES# 0»NO>”! 

1120 INPUT X 

1130 IF X«0 THEN 1210 

1140 G2-G2+I 

1150 IF G-3 THEN 160 

1160 PRINT "HARDER"! 

1170 INPUT X 

1180 IF X-0 THEN 160 

1190 G-G*l 

1200 GOTO 160 

1210 CHAIN "CAVESM" 

1360 REM *** ADD DAUGHTERS TO CURRENT NODE 

1370 Vl-I 

1380 FOR Jl-1 TO 3 

1390 IF R-50 THEN 1440 

1400 Dl-R 

1410 GOSUB 7500 

1420 R-R+l 

1430 NEXT J1 

1440 RETURN 

1450 REM *** CREATE DAUGHTERS# AND RETURN 
1460 GOSUB 1360 
1470 Vl-4 


1480 GOSUB 7500 
1490 RETURN 

1500 REM *** PICK A DAUGHTER NODE AT RANDOM AND GO DOWN 

1510 V1-7 

1520 FOR Jl-1 TO INTCRND<0)*3 ) ♦1 
1530 GOSUB 7500 
1540 IF Dl-9999 THEN 1530 
1550 NEXT J1 
1560 VI-6 
1570 GOSUB 7500 
1580 Dl-9999 

1590 VI-7 
1600 GOSUB 7500 
1610 IF Dl-9999 THEN 1650 
1620 Vl-4 
1630 GOSUB 7500 
1640 GOTO 1510 
1650 RETURN 

CAVES2 

See Sept.’73 issue PCC Vol. 2, No. 1, page 12. 

Length: 1269 words. 

10 REM *** CAVES2 *** YOU MAKE A SET OF LINKED CAVES FOR A FRIEND 
20 REM TO EXPLORE 

30 REM *** WRITTEN BY DAVE KAUFMAN - JUNE 1973 *** 

35 REM *** COPYRIGHT# PEOPLE’S COMPUTER CO. *** 

37 REM *♦* 1921 MENALTO AVE.# MENLO PARK# CA. 94025 *** 

40 PRINT 

50 PRINT "WELCOME TO THE CAVES" 

60 PRINT 

70 PRINT "DO YOU WANT AN INTRODUCTION U-YES# 0«NO>"J 

80 INPUT X 

90 IF X-0 THEN 250 

100 PRINT 

110 PRINT "THIS GAME IS JUST LIKE CAVES 1#" 

120 PRINT "EXCEPT YOU SET UP THE CAVES" 

130 PRINT 

140 PRINT "THEN# YOU CAN EXPLORE THEM#" 

150 PRINT "OR ASK A FRIEND TO FIND HIS WAY OUT" 

160 PRINT 

170 PRINT "A GOOD IDEA IS TO MAKE A MAP" 

180 PRINT "AS YOU GO ALONG# SO YOU CAN SEE" 

190 PRINT "WHAT YOUR CAVES LOOK LIKE" 

200 PRINT 

210 PRINT "EACH CAVERN HAS A NUMBER OF TUNNELS" 

220 PRINT "LEADING TO OTHER CAVERNS - 0 TUNNELS" 

230 PRINT "MEANS A DEADEND CAVERN. OTHERWISE#" 

240 PRINT "YOU CAN HAVE 1#2#3#4 OR 5 TUNNELS" 

250 VI-0 

260 GOSUB 7500 

270 R-l 

280 IF R >- 50 THEN 430 
290 PRINT 
300 PRINT 

310 PRINT "YOU’RE IN CAVERN #"!N1 
320 PRINT "HOW MANY TUNNELS"! 

330 INPUT X 

340 GOTO X*1 OF 550#370#370#370#370#370 
350 PRINT "HOW MANY C0#l#2#3#4#5 ONLY)"! 

360 GOTO 330 

370 PRINT "THEY LEAD TO ”! 

380 VI-1 

390 FOR Dl-R+1 TO R*X 
400 IF D1 <- 50 THEN 450 
410 PRINT 
420 PRINT 



430 PRINT ,, THAT»S ALOT OF CAVERNS I IN FACT. THAT’S MY LIMIT 
440 GOTO 640 

450 print "#";di; 

460 GOSUB 7500 

470 NEXT 01 

480 R-DI-1 

490 Dl-9999 

500 VI-7 

510 GOSUB 7500 

520 VI-6 

530 GOSUB 7500 

540 GOTO 280 

550 VI-5 

560 GOSUB 7500 

570 IF V2<0 THEN 640 

580 VI-7 

590 GOSUB 7500 

600 IF D1*9999 THEN 550 

610 Vl-6 

620 GOSUB 7500 

630 GOTO 300 

640 PRINT 

650 PRINT "THE CAVES ARE COMPLETE EXCEPT FOR ONE SMALL THING 
660 PRINT "THEY NEED A ROOM THAT LEADS TO THE OUTSIDE." 

670 PRINT 

680 PRINT "WHICH ROOM # WILL THAT ONE B£"J 

690 INPUT DI 

700 VI-8 

710 GOSUB 7500 

720 IF V2>0 THEN 750 

730 PRINT "NO FAIR;";D1J"ISN’T A ROOM # !" 

740 GOTO 670 

750 V-Dl 

760 Dl«l 

770 VI-8 

780 GOSUB 7500 

790 PRINT "WHEN YOU’RE READY. TYPE ANY NUMBER" 

800 INPUT X 
810 X-9999 

820 PRINT 

830 PRINT "YOU’RE IN CAVERN #";Nt 

840 IF V«1 THEN 1200 

850 Dl-9999 

860 VI -7 

870 GOSUB 7500 

880 IF Dl-9999 THEN 910 

890 print "#";di; 

900 GOTO 870 

910 IF Nl-1 THEN 980 

920 VI -4 

930 GOSUB 7500 

940 PRINT "#";N1J 

950 X-N1 

960 VI-6 

970 GOSUB 7500 

980 PRINT "ARE VHERE YOU CAN GO" 

990 PRINT "VHERE NEXT"; 

1000 INPUT Dl 

1010 IF Dl-Nl THEN 990 

1020 IF Dl <> X THEN 1060 

1030 VI-4 

1040 GOSUB 7500 

1050 GOTO 820 

1060 VI-6 

1070 GOSUB 7500 

1080 IF V2»0 THEN 1110 

1090 PRINT "ILLEGAL MOVE" 

1100 GOTO 990 

1110 IF Nl-V THEN 1200 

1120 Dl-9999 


14 


1130 

VI -7 




1140 

GOSUB 

7500 



1150 

IF Dl 

<> 9999 THEN 

820 


1160 

PRINT 

"DEADEND" 



1170 

VI-4 




1180 

GOSUB 

7500 



1190 

GOTO 990 



1200 

PRINT 




1210 

PRINT 




1220 

PRINT 

TAB(10);"!!! 

SUNLIGHT 

! ! !" 

1230 

PRINT 




1240 

PRINT 

TAB(10)i"!! ! 

FRESH AIR 

! ! !" 

1250 

PRINT 




1260 

PRINT 

TAB(10)j"... 

REPORTERS 

• • •" 

1270 

PRINT 




1280 

PRINT 





1290 PRINT "VELL. AT LEAST YOU’RE OUT" 

1300 PRINT 

1310 PRINT "THIS SET OF CAVES AGAIN (1-YES. 0*NO)"1 

1320 INPUT X 

1330 IF X-l THEN 760 

1340 PRINT "DO YOU WANT TO MAKE ANOTHER SET OF CAVES (l-YES. 0-NO)"; 

1350 INPUT X 

1360 IF X-l THEN 250 

1370 CHAIN "CAVESM" 


CAVES3 

See Sept.’73 issue PCC Vol. 2, No. 1, page 13. 
Length: 1487 words. 


10 REM *** CAVES3 *** YOU MAKE A SET OF COMPLEX-LINKED CAVES 
20 REM FOR A FRIEND TO FIND HIS WAY OUT OF 
30 REM *** WRITTEN BY DAVE KAUFMAN - JUNE 1973 
40 REM *** COPYRIGHT. PEOPLE’S COMPUTER CO. 

50 REM *** 1921 MENALTO AVE.. MENLO PARK. CA.. 94025 *** 

60 PRINT "WELCOME TO THE CAVES" 

70 PRINT 

80 PRINT "INTRODUCTION (1-YES. 0-NO)"; 

90 INPUT X 

100 IF X-0 THEN 270 

110 PRINT 

120 PRINT ’’ THIS GAME IS LIKE CAVES 1 AND CAVES2 EXCEPT YOU*' 


130 

140 

150 

160 

170 

180 

190 

200 

210 

220 

230 

240 

250 

260 

270 

280 

290 

300 

310 

320 

330 

340 

350 


PRINT "CAN SET UP THE CAVES ANY WAY YOU LIKE. DIFFERENT" 

PRINT "TUNNELS CAN ' LEAD TO THE SAME CAVERN. OP. YOUR CAVERNS" 

PRINT "CAN FORM LOOPS LIKE #12 - #13 - #19 - #12" 

PRINT "(WARNING: NEVER TUNNEL BACK TO CAVERN # l)" 

PRINT ’’ EACH CAVERN HAS A NUMBER OF TUNNELS LEADING TO" 

PRINT "OTHER CAVERNS - 0 TUNNELS MEANS A DEADEND CAVERN" 

PRINT "OTHERWISE. YOU CAN HAVE 1.2.3.4 OR 5 TUNNELS" 

PRINT 

PRINT ’’ WHEN YOU'RE FINISHED. ASK A FRIEND TO FIND HIS WAY OUT" 
PRINT 

PRINT " A GOOD IDEA IS TO MAKE A MAP AS YOU GO ALONG." 

PRINT "SO YOU CAN SEE WHAT YOUR CAVES LOOK .LIKE" 

PRINT 

PRINT ” GOOD LUCK!" 

VI -0 

GOSUB 7500 
R-l 

IF R »- 50 THEN 690 
PRINT 

PRINT "YOU’RE IN CAVERN #";N1 
PRINT "HOW MANY NEW TUNNELS"; 

INPUT X 

GOTO X+l OF 770.380.380.380.380.380 


360 PRINT “HOW MANY <0*1,2,3,4,5 ONLY)"! 

370 GOTO 340 

380 PRINT “ONE AT A TIME:“ 

390 D9-0 

400 FOR I-I TO X 

410 INPUT Y 

420 IF Y-N1 THEN 710 

430 VI-7 

440 01*9999 

450 GOSUB 7500 

460 IF D1*9999 THEN 490 

470 IF Dl-Y THEN 710 

480 GOTO 450 

490 R«R«-1 

500 D1»Y 

510 Vl-1 

520 GOSUB 7500 

530 N2-N1 

540 VI-8 

550 GOSUB 7500 

560 D1-N2 

570 Vl-1 

580 GOSUB 7500 

590 IF D9 <> 0 THEN 650 

600 Dl-9999 

610 VI *7 

620 GOSUB 7500 

630 IF D1 <> N2 THEN 650 

640 D9-N1 

650 VI-8 

660 D1 -N2 

670 GOSUB 7500 

680 IF V2>0 THEN 710 

690 PRINT “THAT’S ALOT OF CAVERNS! IN FACT, THAT’S MY LIMIT!” 

700 GOTO 940 

710 NEXT I 

720 IF D9-0 THEN 770 

730 D1-D9 

740 VI*6 

750 GOSUB 7500 

760 GOTO 310 

770 IF Nl»l THEN 940 

780 VI-4 

790 GOSUB 7500 

800 VI-7 

810 GOSUB 7500 

820 IF Dl-9999 OR Dl-1 THEN 770 

830 N2-N1 

840 VI-8 

850 GOSUB 7500 

860 Dl-9999 

870 VI-7 

880 GOSUB 7500 

890 IF D1-N2 THEN 310 

900 D1-N2 

910 VI*8 

920 GOSUB 7500 

930 GOTO 800 

940 PRINT 

950 PRINT “THE CAVES ARE COMPLETE EXCEPT FOR ONE SMALL THING " 
960 PRINT “THEY NEED A ROOM THAT LEADS TO THE OUTSIDE." 

970 PRINT 

980 PRINT “WHICH ROOM # WILL THAT ONE BE"; 

990 INPUT D1 

1000 VI-8 

1010 GOSUB 7500 

1020 IF V2>0 THEN 1050 

1030 PRINT “NO FAIR;";D1I"ISN’T A ROOM i I" 

1040 GOTO 970 
1050 V-Dl 


1060 Dl-1 
1070 VI-8 
1080 GOSUB 7500 
1090 PRINT 
1100 PRINT 
1110 PRINT 

1120 PRINT "WHEN YOU’RE READY, TYPE ANY NUMBER” 
1130 INPUT X 
1140 PRINT 
1150 PRINT 

1160 PRINT “LET’S GO!" 

1170 X-9999 

1180 PRINT 

1190 PRINT "YOU’RE IN CAVERN #"iNl 

1200 IF W-l THEN 1450 

12)0 Dl-9999 

1220 VI-7 

1230 GOSUB 7500 

1240 IF Dl-9999 THEN 1270 

12-50 PRINT "#";di; 

1260 GOTO 1230 

1270 PRINT "ARE WHERE YOU CAN GO" 

1280 PRINT "WHERE NEXT",* 

1290 INPUT Dl 

1300 IF Dl-Nl THEN 1280 

1310 VI-6 

1320 GOSUB 7500 

1330 IF V2>0 THEN 1360 

1340 PRINT "ILLEGAL MOVE" 

1350 GOTO 1280 

1360 IF Nl-W THEN 1450 

1370 Dl-9999 

1380 VI-7 

1390 GOSUB 7500 

1400 IF Dl <> 9999 THEN 1180 

1410 PRINT "DEADEND" 

1420 VI-4 


15 


1430 GOSUB 7500 
1440 GOTO 1280 
1450 PRINT 
1460 PRINT 

1470 PRINT TABC10);"!!! SUNLIGHT !!!" 

1480 PRINT 

1490 PRINT TAB<10>;"!!! FRESH AIR !!!” 

1500 PRINT 

1510 PRINT TAB(10)1"... REPORTERS * ..." 

1520 PRINT 
1530 PRINT 

1540 PRINT "WELL, AT LEAST YOU’RE OUT" 

1550 PRINT 

1560 PRINT "THIS SET OF CAVES AGAIN Cl-YES, 0-NO)"; 

1570 INPUT X 

1580 IF X-l THEN 1060 

1590 PRINT "DO YOU WANT TO MAKE ANOTHER SET OF CAVES <1-YES, 0-NO)"; 

1600 INPUT X 

1610 IF X«1 THEN 270 

1620 CHAIN "CAVESM” 


CAVESM 


Length: 687 words. 


10 

20 

30 

40 

100 

110 

120 

130 

140 

150 

160 

170 

180 

190 

.200 

210 

220 

230 

240 

250 


REM *** 
REM *** 
REM *** 
REM *** 
PRINT 
PRINT * 
PRINT 
PRINT • 
PRINT * 
PRINT 
PRINT " 
PRINT * 
PRINT 
PRINT ' 
PRINT " 
PRINT 
PRINT • 
PRINT " 
PRINT " 
PRINT 


MENU PROGRAM FOR ALL GAMES IN THE CAVES FAMILY *** 

WRITTEN 3Y DAVE KAUFMAN - SEPTEMBER 1973 **• 

COPYRIGHT , PEOPLE'S COMPUTER COMPANY, MENLO PARK, CA. *** 
1921 MENALTO AVE., MENLO PARK *** 

HERE ARE ALL THE GAMES IN THE 'CAVES' FAMILY**' * 

CAVES 1 THE COMPUTER SETS UP THE CAVES FOR YOU" 

AND YOU TRY TO FIND YOUR VAY OUT" 

CAVES2 HERE YOU CAN MAKE UP THE CAVES FOR A FRIEND" 
WHO HAS TO FIND HIS VAY OUT" 


SAME AS CAVES2, 
COMPLEX CAVES" 


EXCEPT YOU CAN SET UP MORE" 


THESE COMPUTER-MADE CAVES ARE ON ALIEN PLANETS" 
(THERE ARE 4 PLANETS TO EXPLORE) AND EACH HAS" 
DIFFERENT DANGERS. (PROGRAM NOT AVAILABLE YET>» 


260 

270 

280 

290 

300 

310 

320 

330 

335 

340 

350 

360 

370 


PRINT 

PRINT 

PRINT 

PRINT 

PRINT 

PRINT 

PRINT 

PRINT 

PRINT 

PRINT 

PRINT 

PRINT 

END 


" PCAVE5 THE PUBLIC CAVES* NO NUMBERS IN THIS GAME, ALL" 
" THE CAVERNS HAVE NAMES AND ARE COVERED W«tM” 

" WRITING. YOU CAN WRITE 'ANYTHING* YOU LIKE" 

" AND IT WILL STAY ON THE WALLS AFTER YOU LEAVE" 

" TREES YOU CAN MAKE CAVES, GET A MAP PRINTED, THEN" 

GO BACK AND CHANGE THE CAVES. YOU CAN ALSO" 

" SAVE YOUR CAVES INSIDE THE COMPUTER FOR A3" 

" LONG AS YOU LIKE. (PROGRAM NOT AVAILABLE YET)" 

"GOODBYE!!I" 


THE CAVES FAMILY 


16 


After you have completed punching a paper tape for each 
program, use this procedure to save them on the disc. 


The TREE SUBROUTINES must be appended to CAVES1, CAVES2, 
and CAVES3 to make them usuable. 

Procedure: 

With TTY terminal on line and system ready: 


1. Type 

SCR 

(Push RETURN key after typing command) 


Type 

NAME-TREE 

Type 

TAPE 

Load paper tape marked TREE into tape reader. 


Wait while tape is read in. 


Type 

LEN 

Type 

SAVE 

2. Type 

SCR 

Type 

NAME-CAVES1 

Type 

TAPE 

Load tape CAVES1 and read in. 


Type 

LEN 

Type 

APP-TREE 

Type 

9999 END 

Type 

SAVE 


3. To load CAVES2, repeat procedure 2. with CAVES2 
in place of CAVES1. 


4. To load CAVES3, repeat procedure 2. with CAVES3 
in place of CAVES1. 


5. Type 
Type 
Type 

Load tape CAVESM and read in. 

Type 

Type 


SCR 

NAME-CAVESM 

TAPE 

LEN 

SAVE 


6. Unless you have errors or there are errors in the tapes, 
you can play the game now. 

Type 
Type 


GET-CAVES1 

RUN 


[OPEN] 

See Nov/73 issue PCC Vol. 2, No. 2, pages 18,19, 

Length: 1015 words. 

10 REM *+* PUDLIC CAVES OPENING CEREMONY • ** 

20 REM *** WRITTEN BY DAVE KAUFMAN - SEPTEMBER 1973 *** 

30 REM **» PEOPLE’S COMPUTER COMPANY# MENLO PARK, CA. ♦** 

40 REM >>> DON’T FORGET TO APPEND-TREE <<< 

50 REM >>> ALSO# YOU MUST OPEN-PCAVEI#50 *** 

100 DIM NSC561#XSC201,ASC56]#BSC56 J # CS C 56 1 # DS C 56 1# ES C 56 J# FS C 56 1# Gis C 56] 

110 DIM ZS C 72]# SSC 56 3 

120 DIM T C 61 

130 FILES PCAVE1 

140 FOR I-l TO 56 

150 SSCl*M-" ” 

160 NEXT I 

200 PRINT ’’WELCOME TO ...” 

210 PRINT 

220 PRINT ” *** THE GRAND OPENING OF • **” 

230 PRINT ” ’THE PUBLIC CAVES'" 

240 PRINT 
250 PRINT 
300 VI-0 
310 GOSUB 7500 
320 C-l 

500 REM NEW CAVERN *** 

505 PRINT 

510 PRINT ’’YOU ARE IN CAVERN #")Nl 

520 PRINT "THE NAME OF THIS CAVERN VI14, ®E *ff N 

530 INPUT ZS 

540 IF LEN(ZS) <■ 56 THEN 570 
550 PRINT ’’UP TO 56 CHARACTERS” 

560 GOTO 530 
570 NS-ZS 

600 PRINT "AND WHOM SHALL THEY SAY NAMED IT?” 

610 INPUT ZS 

620 IF LENCZS) «» 20 THEN 650 
630 PRINT "UP TO 20 CHARACTERS" 

640 GOTO 610 
650 XS-ZS 

700 PRINT "UP TO 7 LINES OF GRAFFITTI <SAY END TO STOP)” 

702 AS-SS 

704 BS-SS 

706 CS«SS 

708 DS-SS 

710 ES-SS 

712 FS-SS 

714 GS-SS 

716 FOR L«1 TO 7 

720 ENTER 255#T9#ZS 

722 IF T9<0 THEN 720 

724 PRINT 

730 IF LEN(ZS) <• 56 THEN 760 
740 PRINT "UP TO 56 CHARACTERS" 

750 GOTO 720 

760 IF ZS«"END" THEN 1000 

770 GOTO L OF 780#800#820#840#860#680#900 

780 AS -ZS 

790 GOTO 910 

800 BS>ZS 

810 GOTO 910 

820 CS-ZS 


17 


830 GOTO 910 
840 DS-ZS 
850 GOTO 910 
860 ES-ZS 
870 GOTO 910 
880 FS-ZS 
890 GOTO 910 
900 GS-ZS 
910 NEXT L 

1000 REM *** TUNNELS *** 

1010 MAT T-ZER 
1020 Vl«t 
1030 PRINT 

1040 PRINT "HOW MANY TUNNELS LEADING OUT (HINT» 0 TO 4)"#’ 

1050 INPUT X 

1055 IF X-0 THEN 1070 

1060 IF X<0 OP. X>4 THEN 1040 

1065 PRINT "THEY LEAD TO "I 

1070 FOR I-l TO X 

1080 IF C<50 THEN 1110 

1090 PRINT "ENOUGHI 50 CAVERNS IS THE ABSOLUTE MAXIMUM!" 

1100 GOTO 1210 
1110 Dt -C-C + l 
1120 GOSUB 7500 
1130 TCI1-D1 
1135 PRINT "#”;di; 

1140 NEXT I 

1145 PRINT 

1150 V1-4 

1160 GOSUB 7500 

1170 IF V2<0 THEN 1210 

1180 TCI1-N1 

1190 VI-6 

1200 GOSUB 7500 

1210 PRINT M#N1)NS#TC1 3 #T 12 ) # T C 3 I# TC 4 3# TC 5 ] # TC 6 3 # XS# AS,BS # CS# 

1220 IF X-0 THEN 1270 DS#ES#F$#G$ 

123"0 D1-TC13 

1240 VI-6 

1250 GOSUB 7500 

1260 GOTO 500 

1270 V1-4 

1280 GOSUB 7500 

1290 IF V2«0 THEN 2000 

1300 VI-7 

1310 GOSUB 7500 

1320 IF Di-9999 THEN 1270 

1330 VI-6 

1340 GOSUB 7500 

1350 GOTO 500 

2000 REM ++* ALL DONE *** 

2010 PRINT 

2020 FOR I-C+l TO 50 

2030 PRINT #l#IiSS#0#0#0#0#0#0#SSCl#203#SS#SS#SS#SS#SS#SS#SS 

2040 NEXT I 

2050 PRINT "ALL DONS" 

2060 STOP 


PCAVES 

See Nov.*73 issue PCC Vol. 2, No. 2, pages 18,19. 
Length: 3506 words. 


10 

20 

30 

40 

50 

100 

110 

120 

130 

140 

150 

160 

170 

180 

182 

184 

186 

188 

189 

190 
200 
280 
290 
300 
310 
320 
330 
340 
350 
360 
370 
380 
390 
400 
410 
420 
430 
440 
450 
460 
470 
480 
490 
500 
510 
520 
530 
540 
550 
560 
570 
580 
590 
600 
610 
620 
630 
640 
1000 
1010 
1020 
1022 


REM *** PUBLIC CAVES *■♦ 

REM • ** WRITTEN BY DAVE KAUFMAN - AUGUST 1973 **• 

REM • •• PEOPLE'S COMPUTER COMPANY* MENLO PARK# CA. *** 

REM >>> BEFORE RUNNING PCAVES FOR THE FIRST TIME ON YOUR SYSTEM# 
REM »> YOU MUST RUN COPEN3 (THE OPENING CEREMONY PROGRAM ««< 
FILES PCAVEI 

REM AS THRU GS STORE THE SEVEN GRAFFITI LINES FOR THE 
REM CURRENT CAVERN 

DIM ASC563*BSC563*CSC561«DSCS63*ESC563«FSC56]#GSC56] 

REM NS IS THE NAME OF THE CURRENT CAVERN AND XS IS THE NAME 

REM OF ITS CREATOR 

DIM MS C 56 3 # XS C 20 3 

REM THESE ARE TEMPORARIES 

DIM KSC563*MSC56)*SSC563*YSC203#ZSC721 

FOR 1*1 TO 56 

SS CI * I 3■" " 

NEXT I 
DIM ISC63 
IS-"123456" 

REM S AND T ARRAYS ARE THE TUNNEL POINTERS 
DIM SC63*TC67 

B-D-0 

Nl-1 

PRINT "WELCOME TO ... ‘THE PUBLIC CAVES'” 

PRINT 

PRINT "WOULD YOU LIKE AN INTRODUCTION (YES OR NO)"J 
INPUT ZS 

IF ZSCi*l3 #"Y" THEN 1000 
PRINT 

PRINT " I SHALL ACT AS YOUR GUIDE THRU ’THE PUBLIC CAVES ." 
PRINT "FEEL FREE TO BROWSE THRU THE CAVERNS AND TUNNELS" 

PRINT "WHICH MAKE UP THE PUBLIC CAVES." 

PRINT 

PRINT " ENJOY THE DELECTABLE WRITINGS ON THE WALLS" 

PRINT "LEFT BY THOSE WHO'VE COME BEFORE YOU. ADD YOUR OWN" 
PRINT "LINES WHENEVER THE CREATIVE URGE STARTS ITCHING." 

PRINT 

PRINT " YOU CAM ALSO CREATE A MEW CAVERN (AND NAME ITTOOj)" 
PRINT "OR ELSE DIG A TUNNEL FROM THE CAVERN YOU FIND YOURSELF" 
PRINT "IN TO ANY OTHER CAVERN OF YOUR CHOICE." 

PRINT 

PRINT " AFTER BROWSING AWHILE IN EACH CAVERN* READING THE" 
PRINT "GRAFFITTI AND WHATNOT* l SHALL ASK YOUl" 

PRINT 

PRINT "WHAT WOULD YOU LIKE TO DO NEXT7" 

PRINT 

PRINT "YOU CAN SAYl" 

PRINT 

IF YOU WANT TO ADD SEVERAL LINES OF YOUR OWN" 
IF YOU WISH TO MOVE ON TO ANOTHER CAVERN" 

IF YOU WOULD LIKE TO BUILD A NEW CAVERN" 

(AND AUTOMATICALLY DIG A TUNNEL TO IT)" 

IF YOU WANT TO DIG A TUNNEL" 

(TO AN EXISTING CAVERN)" 

IF YOU'VE DECIDED TO LEAVE 'THE PUBLIC CAVES'. 
*** IMMEDIATELY ***" 


WRITE 

MOVE 

BUILD 

DIG 

OUT 


PRINT ' 

PRINT 1 
PRINT ' 

PRINT ' 

PRINT 
PRINT 
PRINT 
PRINT 
PRINT 

PRINT " LET'S GO !!!" 

PRINT 

PRINT 

READ #l*Ni;N$*TC 1 3* TC 2 3#T C 3 3 * TC 4 3 * TC 5 3# TC 6 3 * XS* AS , BS* CS* 
FOR l-LEN(NS) TO I STEP -I DS*ES*FS*G* 


1024 IF NS CI«I 3 #" " THEN 1028 
1026 NEXT I 
1028 NS"NS C 1 * I 3 

1030 PRINT "YOU ARE NOW IN ..." 

1035 PRINT "'"INS!. 

1040 PRINT 

1042 FOR I-LENCXS) TO 1 STEP -1 
1044 IF XS CI* I 3 #" " THEN 1048 
1046 NEXT I 
1048 XS>XSC1«I3 

1050 PRINT "WHICH WAS CREATED BY ")XS 
1060 PRINT 

1070 REM *** GRAFFITTI *** 

1080 IF AS#SS THEN 1130 
1090 L-l 

1100 PRINT "THE WALLS ARE EMPTY HERE" 

1120 GOTO 1500 

1130 PRINT "THIS IS WRITTEN ON THE WALLSl" 
1140 PRINT 
1150 PRINT AS 


18 


1160 

1170 

1180 

1190 

1200 

1210 

1220 

1230 

1240 

1250 

1260 

1270 

1280 

1290 

1300 

1310 

1320 

1330 

1340 

1350 

1360 

1370 

1380 

1390 

1400 

1500 

1510 

1520 

1530 

1540 

1550 

1560 

1570 

1580 

1585 

15*0 

1595 

1600 

1610 

16C0 

1630 

1640 

1650 

1660 

1670 

1675 

1677 

1680 

1690 


IF BS#SS THEN 1190 
L-2 

GOTO 1500 
PRINT BS 

IF CS#SS THEN 1230 
L-3 

GOTO 1500 
PRINT CS 

IF DSiSS THEN 1270 
L*4 

GOTO 1500 
PRINT DS 

IF ES#SS THEN 1310 
L-5 


GOTO 1500 
PRINT ES 

IF FS#SS THEN 1350 
L-6 

GOTO 1500 
PRINT FS 

IF GS#SS THEN 1390 
L-7 

GOTO 1500 
PRINT GS 
L-8 

REM •** WHAT NEXT *** 

PRINT 

PRINT "WHAT WOULD YOU LIKE TO DO NEXT") 

INPUT ZS 

IF ZSC1*53■"WRITE" THEN 1600 
IF ZSC1*43■"MOVE" THEN 2000 
IF ZS C1# 5 3■"BUILD" THEN 2200 
IF ZSC1*33■"DIG" THEN 2400 
IF ZSC1*33-"OUT" THEN 2800 

PRINT "I'M SORRY* BUT THE ONLY WORDS I RECOGNIZE ARE" 
PRINT " WRITE* MOVE# BUILD* DIG* OUT" 

GOTO 1500 


REM *** WRITE *** 

PRINT "WRITE A LINE AT A TIME 
PRINT "TYPE THE WORD END .~ 
PRINT 

FOR 1*1 TO 7 
GOSUB 3500 

IF LEN(ZS)#3 THEN 1680 
IF ZS C1 * 3 3 #"END" THEN 1680 
PRINT #l*Nl)NS*TCI3*TC23*TC33* 
GOTO 1500 

IF L <■ 7 THEN 1800 
AS «BS 


... WHEN YOU'RE FINISHED*" 


TC43*TC53*TC63 « XS * AS * BS * C$, 
DS*ES*FS*GS 


1700 BS-CS 
1710 CS-DS 
1720 DS-ES 
1730 ES-FS 
1740 FS-GS 
1750 GS-ZS 
1760 L-L+l 
1770 GOTO 1950 

1800 GOTO L OF l810#1830#1850#1870#1890#1910#1930 

1810 AS-ZS 

1820 GOTO 1940 

1830 BS-ZS 

1840 GOTO 1940 

1850 CS-ZS 

1860 GOTO 1940 

1870 DS-ZS 

1880 GOTO 1940 

1890 ES-ZS 

1900 GOTO 1940 

1910 FS-ZS 

1920 GOTO 1940 

1930 GS-ZS 

1940 L-L*l 

1950 NEXT I 

1960 GOTO 1675 

2000 REM *** MOVE *** 

2020 PRINT "TUNNELS LEAD TOt" 

2030 FOR 1-1 TO 6 

2040 IF TCI1-0 THEN 2080 

2050 READ #1,TCI]IMS 

2060 PRINT IltLIU" *"!MSI" 

2070 NEXT I 
2080 PRINT 

2082 IF I>2 THEN 2090 

2084 J»1 

2086 GOTO 2120 

2090 PRINT "WHICH NUMBER”! 

2100 INPUT J 

2110 IF J<1 OR J»I-I THEN 2090 

2120 N1-TCJ3 

2130 GOTO 1000 

2200 REM +** BUILD **- 

2202 IF B-0 THEN 2210 

2204 ‘ PRINT "ONLY ONE 'BUILD* PER VISIT" 

2206 GOTO 1500 

2210 GOSUB 3000 

2220 IF T-0 THEN 1503 ' 

2230 FOR N2-N1♦1 TO 50 
2240 READ #1#N2IMS#T1 
2250 IF T1*0 THEN 2300 
2260 NEXT N2 

2270 PRINT "THERE'S NO ROCK LEFT IN 'THE PUBLIC CAVES' TO BUILD" 
2280 PRINT "NEW CAVERNS." 

2290 GOTO 1500 

2300 PRINT "VHAT WILL THE NAME OF THE NEW CAVERN BE?" 

2310 GOSUB 3500 
2315 HS-ZS 

2320 PRINT "AND YOUR NAME IS"! 

2330 INPUT ZS 

2332 IF LENCZS) <- 20 THEN 2338 

2334 PRINT "AW, COME ON - YOUR NAME ISN'T THAT LONG." 

2336 PRINT "BESIDES# I CAN ONLY TAKE UP TO 20 LETTERS" 

2337 GOTO 2330 

2338 YS-ZS 

2340 PRINT "STAND BACK - THE MINERS AND ELECTRICIANS ARE GETTING" 


19 


2342 PRINT "TO WORK." 

2346 PRINT 

2347 PRINT "RUMBLE RUMBLE DIG DIG BUZZ BUZZ FLICKER FLICKER" 
2348' PRINT #1#N2iHS#N1#0,0#0,0,0,YS*SS#-SS*SS#SS#SS#SS#S$ 

2350 TCT03-M2 

2360 PRINT #1#N1INS#TC1]#TC2]#TC33#TC4]#TC53#T[63# XS# AS # BS # CS # 

2361 B«l DS,ES#Fi#<»$ 

2362 PRINT 

2363 PRINT " ANOTHER SUCCESSFUL ADDITION TO 'THE PUBLIC CAVES'" 

2364 PRINT "YOU CAN 'MOVE' TO YOUR NEW CAVERN NEXT# IF YOU LIKE" 
2370 GOTO 1500 

2400 REM * + * DIG **■*■ 

2402 IF D-0 THEN 2410 

2404 PRINT "ONLY ONE 'DIG' PER VISIT" 

2406 GOTO 1500 

2410 GOSUB 3000 

2420 IF T-0 THEN 1500 

2430 PRINT "THE MINERS ARE STANDING BY FOR DRILLING ..." 

2440 PRINT "WHAT IS THE NAME OF THE CAVERN YOU WANT THEM TO DIG To?" 
2450 INPUT ZS 

2452 IF LENCZS) <« 56 THEN 2458 

2454 HS«ZSC1#561 

2456 GOTO 2460 

2458 HS-ZS 

2460 FOR N2-1 TO 50 

2470 READ #1#N2!MS#SC1]#SC2]#SC3]#SC4)#SC5)#SC6] 

2480 IF HS-MS THEN 2520 
2490 IF SCI 3-0 THEN 2500 
2495 NEXT N2 

2500 PRINT "HMM ... CAN'T FIND THAT NAME ON MY LIST" 

2502 PRINT "MAYBE YOU LEFT OUT SOME SPACES OR MISSED A LETTER -" 
2504 PRINT "I NEED TO HAVE THE NAME EXACTLY AS ITS TYPED OUT" 

2510 GOTO 1500 

2520 IF N2#N1 THEM 2550 

2530 PRINT "HEY - IT WOULD BE SILLY TO CONNECT THIS CAVERN WITH 

2540 GOTO 1500 ITSELF!" 

2550 FOR S0-1 TO 6 

2560 IF SCS03-0 THEN 2650 

2570 NEXT S0 

2580 PRINT "JUST CHECKED WITH THE MINERS STANDING BY IN" 

2590 PRINT "*"!HSI"•" 

2600 PRINT "THEY SAY THERE'S ALREADY SIX TUNNELS LEADING OUT" 

2610 PRINT "FROM THERE ... ANY MORE TUNNELS AND THERE WON'T BE ANY" 
2620 PRINT "SPACE LEFT FOR GRAFFITI!" 

2630 GOTO 1500 

2650 PRINT "OK - I JUST GAVE THE MINERS THE GO-AHEAD SIGNAL.'* 

2660 PRINT "STAND CLEAR FOR FALLING ROCKS!lilt!" 

2670 PRINT 

26B0 PRINT " RUMBLE RUMBLE RUMBLE" 

2682 TCT03-N2 

2684 PRINT # 1 # N11 NS# T C 1 ]# TC 2 ) # TC 3 3 # T C 4 ) # TC 5 ] # T C 6 3# XS# AS # BS # C$, 

2686 READ #1#N2!NS# SCI3#SC2]#SC3 3#SC43#SC53#SC 6 3# XS#AS#BsfCS# 

2687 SCS03-N1 DS#ES#FS#G$ 

2688 PRINT #1#N2!NS#SC13#SC23#SC33#SC43,SC53#SC63#XS#AS#BS#C$, 

DS#ES#FS#GS 

2689 READ » 1#N11NS#TC13#TC23#TC33#TC43#TC53#TC63#XS#AS#Si#C$, 

2690 ENTER 15#T9#ZS DS#Ei#FS#G* 

2692 PRINT 

2700 PRINT " ALL CLEAR" 

2705 D«1 

2710 GOTO 1500 

2800 REM *** OUT *** 

2810 PRINT 

2820 PRINT "THANKS FOR VISITING 'THE PUBLIC CAVES' WITH ME" 


2830 PRINT 

2840 PRINT "BRING YOUR FRIENDS BACK NEXT TIME AND SHOW-THEM A ROUND! 

2850 PRINT 

2860 CHAIN "CAVESM" 

3000 REM *** CHECK i OF TUNNELS *•* 

3010 FOR T0* 1 TO 6 

3020 IF TCT03-3 THEM 3083 

3030 NEXT T3 

3040 PRINT "THIS CAVERN HAS SIX TUNNELS ALREADYi ANY MORE AND" 

3050 PRINT "THERE WON’T BE P.OCK LEFT TO WRITE GRAFF ITT I . ON I" 

3060 T *0 
3070 RETURN 
3080 T»1 

3090 RETURN 

3500 REM *** INPUT ZS AND CHECK LEN<ZS) *** 

3505 PRINT "7"; 

3510 ENTER 255,T9,ZS 

3512 IF T9<0 THEN 3510 
3514 PRINT 

3520 IF LENCZS) «» 56 THEN 3560 

3530 PRINT "I’LL RUN OUT OF CRAYON WITH A LINE THAT LONG." 

3540 PRINT "TRY AGAIN" 

3550 GOTO 3510 
3560 RETURN 
9999 END 


DUMPS 

Length: 506 words. 


20 


10 

20 

30 


60 

70 

80 

90 

f00 

110 

120 

130 

140 

150 

160 

170 

180 

190 

200 

210 

220 

230 

240 

250 

260 

270 

280 

290 

300 

310 

320 

330 

340 

350 

360 

370 

380 

390 

400 

410 

420 

430 

440 

450 

460 

470 

480 

490 

500 

510 

520 

530 


USING 153JN1 
CAVERN # " 


”**««**«**+******" 


"THE NAME IS 
"iNSi. 


REM ♦** DUMPS PUBLIC CAVES *** 

DIM NSC563,XSC20],TC6J,ASC561,BSC56],CSC563,D$C56],ESC563, 

DIM SSCS63 FS C 56 3,GS [96 ] 

FOR S-l TO 56 
SS C S,5 3 *" " 

NEXT S 
FILES PCAVE1 

PRINT "DUMP OF PUBLIC CAVES FOR DAY #";TIMC2>;",YEAR 19"JTIMt3) 
FOR N1■1 TO 50 

READ #1,N1JNS,TC 1 3 , TC2 3 , TC 3 3, T C4 3 ,TC 5 3, TC 6 3, XS, AS,BS,CS , 

PRINT DS,ES, FS,Gi 

PRINT "****************" 

PRINT 
PRINT 

IMAGE "* CAVERN # "4 2D, 

PRINT 
PRINT 
PRINT 
PRINT 
PRINT 
PRINT 

PRINT "AND IT WAS CREATED BY ..."IXS 
PRINT 

IF AS#SS THEN 270 
PRINT "THE WALLS ARE EMPTY HERE" 

GOTO 420 

PRINT "THIS IS WRITTEN ON THE VALLSi" 

PRINT 
PRINT AS 

IF BS-SS THEN 423 
PRINT BS 

IF CS*SS THEN 420 
PRINT CS 

IF DS«SS THEN 420 
PRINT DS 

IF ES*SS THEN 420 
PRINT ES 

IF FS«SS THEN 420 
PRINT FS 

IF GS-SS THEM 420 
PRINT GS 
PRINT 

PRINT "TUNNELS LEAD TO ..." 

PRINT "CAVERN » NAME" 

FOR T1■1 TO 6 
IF TCTl 1-0 THEN 510 
READ #1 4 TCTI3 INS 
PRINT USING "#42X42D45X";TCTI3 
PRINT NS 
NEXT T1 
NEXT N1 

PRINT "THAT’S ALL, FOLKS!!!" 

END 


DUMPS: This program is useful if you want to get a print out of what has 
happened in PCAVES after it has been opened to the public for a period of 
time. DUMPS lists the caverns, their names, who created them, what is written 
on the walls, and where the tunnels lead. 


PUBLIC CAVES 


After you have completed punching a paper tape for each 
program, use this procedure to save them on the disc. 

The TREE SUBROUTINES must be appended to make [OPEN] usuable. 
A file named PCAVE1 must be opened with space for 50 records. 


Procedure: 

1. Type 
Type 
Type 

Load paper tape TREE into tape reader. 
Wait while tape is read in. 

Type 

Type 


SCR 

NAME-TREE 

TAPE 


LEN 

SAVE 


2. Type 
Type 
Type 

Load tape PCAVES and read in. 

Type 

Type 


SCR 

NAME-PCAVES 

TAPE 

LEN 

SAVE 


3. Type 
Type 
Type 

Load tape [OPEN] and read in. 

Type 

Type 

Type 

Type 


SCR 

NAME-[OPEN] 

TAPE 

LEN 

APP-TREE 
9999 END 
SAVE 


4. Initialize the cave structure. 

Type 

Type 

Type 

Run [OPEN] only this once. After you have 
set up a few caverns the cave structure will be 
ready for the public. 


OPEN-PCAVE1,50 

GET-[OPEN] 

RUN 


5. If there have been no errors or errors in the tape, 
you can let anyone play the game now. 

Type 
Type 


GET-PCAVES 

RUN 


WUMPUS 21 

See Nov.’73 issue PCC Vol. 2, No. 2, page 23. 

Length: 2754 words. 

10 REM- HUNT THE WUMPUS 
20 PRINT “INSTRUCTIONS (Y-N)”; 

30 INPUT IS 

40 IF IS-”N" THEN 52 

50 GOSUB 1000 

52 REM- ANNOUNCE WUMPUS11 FOR ALL AFICIONADOS ... ADDED PY DAVE 
54 PRINT 

56 PRINT " ATTENTION ALL WUMPUS LOVERS!!I” 

50 PRINT " THERE ARE NOW ADDITIONS TO THE WUMPUS FAMILY”; 

60 PRINT " OF PROGRAMS.” * 

62 • PRINT 

64. PRINT " WUMP2* SOME DIFFERENT CAVE ARRANGEMENTS” 

66 PRINT ” WUMP3I DIFFERENT HAZARDS" 

67 PRINT " WUMP1-: hioc-w-scek m 

68 REM- SET UP CAVE (DODECAHEDRAL NODE LIST) 

70 DIM SC20.33 

80 FOR J-l TO 20 
90 FOR K-l TO 3 
100 READ SCJ.K3 

110 NEXT K 

120 NEXT J 

130 DATA 2*5*8*1.3.10.2.4.12.3.5.14. 1*4.6 

140 DATA 5. 7, 15,6.8. 17. 1,7,9.8. 13, 18.2,.9, 11 

150 DATA 10,12,19,3,11,13,12,14,20,4,13,15,6,14,16 

160 DATA 15,17,20,7,16,18,9,17,19,11,10,20,13,It,19 

170 DEF FNA(X)-INT(20*HND(0))+l 

180 DEF FNB(X)■INT(3*RND( 0)) +1 

190 DEF FNC ( X > -1 NT(4*RND(0 ) ) +1 

200 REM-LOCATE L ARRAY ITEMS 

210 REM-1-YOU,2-WUKPUS,344-PITS,546-BATS 

220 DIM LC63 

230 DIM MC63 

240 FOR J-l TO 6 

250 LCJ3-FNAC0) 

260 MCJ3-LCJ3 
270 NEXT J 

280 REM-CHECK FOR CROSSOVERS (IE L( l >-L(2>,ETC ) 

290 FOR J-l TO 6 

300 FOR K-J TO 6 

310 IF J-K THEN 330 

320 IF LCJ3-LCK3 THEN 240 

330 NEXT K 

340 NEXT J 

350 REM-SET# ARROWS 

360 A-5 

365 L-LC13 

370 REM-rUN THE GAME 

375 PRINT "HUNT THE WUMPUS" 

380 HEM-HAZARD WARNINGS 4 LOCATION 

390 GOSUB 2000 

400 HEM-MOVE OR SHOOT 

410 GOSUB 2500 

420 GOTO 0 OF 440,480 

430 REM-SHOOT 

440 GOSUB 3000 

450 IF F-0 THEN 390 

460 GOTO 500 

470 HEM-MOVE 

480 GOSUB 4000 

490 IF F-0 THEN 390 

500 IF F>0 THEN 550 

510 REM-LOSE 

520 PRINT "HA HA HA - YOU LOSE!" 


530 
540 
550 
560 
570 
560 
590 
600 
610 
600 
1000 
1010 
1020 
1030 
1040 
1050 
1060 
10 70 
1080 
1090 
1100 
1110 
1120 
1130 
1140 
1150 
1160 
1170 
1180 
1190 
1200 
1210 
1220 
1230 
1240 
1250 
1260 
1270 
1260 
1290 
1300 
1310 
1320 
1330 
1340 
1350 
1360 
13 70 
1380 
1390 
1400 
1410 
2000 
2010 
20 2 0 
20 3 0 
2040 
20 5 0 
2060 

20 70 
20 80 
2090 
2100 

21 10 
2120 
2130 
2140 
2150 
2160 


GOTO 560 
HEM-WIN 

PH I NT "HEE HEE HEE - THE VUMPUS'LL GETCHA NEXT TI ME I I" 

FOH J-l TO 6 
LCJJ-MCJJ 
NEXT J 

PHINT "SAME SET-UP <Y-N>"J 
INPUT IS 

IF I$#"Y" THEN 240 
GOTO 360 

HEM-INSTRUCTIONS 

PRINT "WELCOME TO 'HUNT THE WUMPUS'" 

PRINT " THE WUMPUS LIVES IN A CAVE OF 20 ROOMS. EACH xiOOM" 

PRINT "HAS 3 TUNNELS LEADING TO OTHER ROOMS. (LOOK AT A" 

PRINT "DODECAHEDRON TO SEE HOW THIS WORKS-IF YOU DON'T KNOW" 

PRINT "WHAT A DODECAHEDRON IS. ASK SOMEONE)" 

PRINT 

PRINT " HAZARDSS" 

PRINT " BOTTOMLESS PITS - TWO ROOMS HAVE BOTTOMLESS PITS IN THEM" 
PRINT " IF YOU GO THEnE, YOU FALL INTO THE PIT (ft LOSE!)" 

PRINT " SUPER BATS - TWO OTHER ROOMS HAVE SUPER BATS. IF YOU" 

PRINT " GO THERE, A BAT GRABS YOU AND TAKES YOU TO SOME OTHER" 

PRINT " ROOM AT RANDOM. (WHICH MIGHT BE TROUBLESOME)" 

PRINT 

PHINT " WUMPUS*" 

PRINT " THE WUMPUS IS NOT BOTHEhED BY THE HAZARDS (HE HAS SUCKER" 
PRINT " FEET AND IS TOO BIG FOR A BAT TO LIFT). USUALLY" 

PHINT " HE IS ASLEEP. TWO THINGS WAKE HIM UP I YO'JR EN’l EfilNG" 

PHINT " HIS ROOM OR YOUr SHOOTING AN ARROW." 

PRINT " IF THE WUMPUS WAKES, HE MOVES (P-.75) ONE ROOM" 

PRINT " OR STAYS STILL (P-.25). AFTER THAT, IF HE IS WHE.iE YuU" 
PRINT " ARE, HE EATS YOU UP (ft YOU LOSE!)" 

PRINT 

PRINT " YOU!" 

PRINT " EACH TURN YOU MAY MOVE OH SHOOT A CROOKED ARROW" 

PRINT " MOVING* YOU CAN GO ONE ROOM (THRU ONE TUNNEL)" 

PRINT " ARROWS* YOU HAVE 5 ARROWS• YOU LOSE WHEN YOU RUN OJr." 

PRINT " EACH ARROW CAN GO FROM I TO 5 .nOOMS. YOU Air BY 1ELLING" 

PRINT " THE COMPUTER THE rOOM#S YOU WANT THE ARROW TO GO TO." 

PRINT " IF THE ARROW CAN'T GO THAT WAYCIE NO TUNNEL) IT MOVES" 

PRINT " AT RANDOM TO IHE NEXT ROOM." 

PRINT " IF THE ARROW HITS THE WUMPUS, YOU WIN." 

PRINT " IF THE ARROW HITS YOU, YOU LOSE." 

PRINT 

PRINT " WARNINGS*" 

PRINT " WHEN YOU ARE ONE ROOM AWAY FROM WUMPUS OR HAZARD." 

PRINT " THE COMPUTER SAYS*" 

PRINT " WUMPUS- 'I SMELL A WUMPUS'" 

PHINT " BAT - 'BATS NEArBY'" 

PHINT " PIT - 'I FEEL A DRAFT'" 

PRINT "« 

RETURN 


REM-PRINT LOCATION ft HAZARD WARNINGS 
PRINT 

FOr J-2 TO 6 
FOR K-l TO 3 

IF SCLCn,K3#LCJ3 THEN 2110 

GOTO J-l OF 2060,2080,2080,2100,2100 

print "i smell a wumpjs!" 

GOTO 2110 

PRINT "I FEEL A DRAFT" 

GOTO 2110 

PHINT "BATS NEARBY!" 

NEXT K 
NEXT J 

PRINT "YOU ARE IN ROOM "LC13 

PHINT "TUNNELS LEAD TO "SCL,131S CL,2 31SCL,33 

Phi NT 

RETURN 


22 


2500 REM-CHOOSE OPTION 
2510 PRINT "SHOOT OR MOVE (S-M)") 

2520 INPUT IS 
2530 IF IS#"S" THEN 2560 
25 4 0 0-1 

2550 RETURN 

2560 IF IS#"M" THEN 2510 
8570 0-2 

2580 RETUHN 
3000 REM-ARHOW ROUTINE 

3010 F-0 

3020 REM-PATH OF ARROW 
3030 DIM PC5 3 

3040 PRINT "NO. OF hOOMS(1-5>"; 

30 5 0. INPUT J9 

3060 IF J9< I OR J9>5 THEN 3040 
30 70 FOR K-l TO J9 
3030 PRINT "ROOM #") 

30 90 INPUT PCK3 
3095 IF K <* 2 THEN 3115 
3100 IF PCK3 <> PCK-23 THEN 3115 
3135 PHINT "ARROWS AREN'T THAT CROOKED - T.-iY ANOTHER ROOM" 
3110 GOTO 3080 
.3115 NEXT K 
3120 REM-SHOOT AnROV 
3130 L-LC13 
3140 FOR K-1 TO J9 
3150 FOR Kl-1 TO 3 
3160 IF SCL.Kl3-PCK3 THEN 3295 
3170 NEXT K1 

3180 REM-NO TUNNEL FOR ARROW 

3190 L«SCL,FN3(1)3 

3200 GOTO 3300 

3210 NEXT K 

3220 PRINT "MISSED" 

322 5 L-LC13 
3230 HEM-MOVE WUMPUS 
3240 GOSUB 3373 
3250 REK-AMMO CHECK 

32 5 5 A-A-l 

3260 IF A>3 THEN 3280 
3270 F--1 
3280 RETURN 

3290 REK-SEE IF ARROW IS AT LCD OH LC2) 

3295 L-PCK3 

33 0 0 IF LfLC2 3 THEN 3349 

3310 PRINT "AHA! YOU GOT THE WUMPUS!" 

3320 F-l 
3330 RETURN 

3340 IF LiLCIJ THEN 3219 

3350 PRINT "OUCH! AxlROl. GOT YOU!" 

3360 GOTO 3270 

3370 REK-MOVE WUMPUS nOUTINE 

33 8 0 K-FNC ( 0 ) 

3390 IF K-4 THEN 3410 
3400 LC23-SCLC2 3.KJ 
3410 IF LC2J#L THEN 3440 

3420 PHINT "TSK TSK TSK- WUMx’US GOT YOU!" 

3430 F--I 

3440 RETURN 

4000 REM- MOVE ROUTINE 

4010 F-0 

4020 PRINT "WHERE TO") 

4030 INPUT L 

4040 IF L<1 OH L>20 THEN 4080 
*B50 FOR K-l TO 3 
40 60 HEM- CHECK IF LEGAL MOVE 
4070 IF SCLC13.KJ-L THEN 4130 
*080 NEXT K 


40 90 IF L-LC13 THEN 4130 

4100 PRINT "NOT POSSIBLE - M J 

4110 GOTO 4020 

4120 REM-CHECK FOH HAZARDS 

4130 LC1J-L 

4140 REM-WJMPU5 

4150 IF L#LC2 3 THEN 4220 

4160 PRINT "... OOPS! BUMPED A WUMPUS!" 

4170 REM-MOVE WUMPUS 
418fr G0SU3 3380 
4190 IF F»0 THEN 4220 
4200 RETURN 
4210 REM-PIT 

42 20 IF L#LC3 3 AND L#LC43 THEN 4270 

4230 PRINT "YYYIIIIEEEE . . . FELL IN PIT” 

4240 F--1 

4250 RETURN 

42 60 REM-BATS 

4270 IF L#LC53 AND L#LC63 THEN 4310 

4280 PRINT M ZA?--SUPER BAT SNATCH! ELSEWHEREVILLE FOR YOU!' 
4290 L*FNA(1 ) 

43 0 0 GOTO 4130 
4310 RETURN 
5000 END 

WUMP3 SUPER WUMPUS 

Length: 2529 words. 

10 REM- HUNT THE WUMPUS 

20 PRINT "INSTRUCTIONS (Y-N>"1 
30 INPUT IS 

40 IF IS»"N" THEN 68 
50 GOSUB 1000 

68 REM- SET UP CAVE (DODECAHEDRAL NODE LIST) 

70 DIM SC 20* 3 3 
80 FOR J«1 TO 20 
70 FOR K» I TO 3 
100 READ SCJ*K3 
110 NEXT K 
120 NEXT J 

130 DATA 2*5*8*1*3*10*2*4*12*3*5*14*1*4*6 

140 DATA 5*7*15*6*8*17*1*7*9*8*10*18*2*9*11 

150 DATA 10*12*19*3*11*13*12*14*20*4*13*15*6*14*16 

160 DATA 15*17*20*7,16*18*9*17*19*11*18*20*13*16*19 

170 DEF FNA(X)* INT(20*RND( 0 ) ) ♦ 1 

180 DEF FNB (X) * INT (3*RND(0 ) ) ♦ 1 

190 DEF FNC(X)-INT(4+RND(0))«-1 

195 DEF FND(X)=INTC12*RMD(0) ) ♦ 1 

200 REM-LOCATE L ARRAY ITEMS 

205 REM-H IS THE NUMBER OF 'RESIDENTS* 

210 H«7 

21 5 REM-1-YOU*2-WUMPUS*344-PITS*546-BATS* 7-TUMAERO 
220 DIM LC7 3 

230 DIM MC71 
240 FOR J-l TO H 
250 LCJ3-FNAC0) 

260 MCJ3-LCJ3 
270 NEXT J 

280 REM-CHECK FOR CROSSOVERS CIE L(1)»L(2)* ETC) 

290 FOR J«1 TO H 

300 FOR K-J TO H 

310 IF J»K THEN 330 

320 IF LCJ3-LCK3 THEN 240 

330 NEXT K 

340 NEXT J 

350 REM-SET# ARROWS 

355 A-5 


23 


360 L-LC13 

365 REM-RUN THE GAME 

370 PRINT "HUNT THE WUMPUS" 

375 REM-CHECK 'UNUSUAL' CONDITIONS 

380 GOSUB 1800 

385 GOSUB 4130 

390 GOTO F♦2 OF 520*400,550 

395 REM-HAZARD WARNINGS 4 LOCATION 

400 GOSUB 2000 

405 REM-MOVE OR SHOOT 

410 GOSUB 2500 

420 GOTO 0 OF 440*480 

430 REM-SHOOT 

440 GOSUB 3000 

450 GOTO 490 

470 REM-MOVE 


480 

490 

510 

520 

530 

540 

550 

560 

570 

580 

590 

600 

610 

620 

1000 

1005 

1010 

1020 

1030 

1040 

1050 

1060 

1070 

1080 

1090 

1100 

1110 

1120 

1130 

1140 

1150 

1160 

1170 

1180 

1795 

1800 

1805 

1810 

1815 

1820 

1825 

1830 

1835 

1840 

1645 

1850 

1855 

1868 

1865 

1870 


GOSUB 4000 

GOTO F *2 OF 520*380*550 
REM-LOSE 

PRINT "HA HA HA - YOU LOSE!" 

GOTO 560 
REM-WIN 

PRINT "HEE HEE HEE - THE WUMPUS*LL GETCHA NEXT TIME!!" 

FOR J»1 TO 6 
LCJJ-MCJ1 
NEXT J 

PRINT "SAME SET-UP (Y-N>"1 
INPUT IS 

IF IS#"Y" THEN 240 
GOTO 355 

REM-INSTRUCT IONS 
PRINT 

PRINT "THIS VERSION (WUMP3) OF ‘HUNT THE WUMPUS* IS PLAYED" 
PRINT "LIKE THE ‘NORMAL* VERSION WITH A FEW (CHUCKLE) ADDITIONS 
PRINT 

PRINT "TUMAERO (ANAEROBIC TERMITE) SVARMi EATS CROOKED ARROWS* 
PRINT TAB(10)l"ONE ARROW EACH TIME YOU ENTER ITS ROOM." 

PRINT "WARNING: 'MY ARROWS ARE QUIVERING* WHEN YOU ARE "J 
PRINT "ONE ROOM AWAY." 

PRINT 

PRINT "HAZARDS CAN MOVE!!” 

PRINT TAB(5)*"WUMPUS - THE WUMPUS SLEEP-WALKS" 

PRINT TAB(5)J"PITS - EARTHQUAKES CLOSE THE OLD PITS AND"; 

PRINT " FORM NEW ONES" 

PRINT TA8(5)*"BATS 
PRINT TAB(5>;"TUMAEROS 
PRINT 

PRINT "GOOD LUCK!" 

PRINT 
RETURN 

REM-SLEEP-WALKING» EARTHQUAKES* 

PRINT 

IF FND(0)>1 THEN 1820 

PRINT "DON'T BLINK NOV* BUT I HEAR THE WUMPUS SLEEP-WALKING!!" 
LC23-FNA(0) 

IF FND(0)>l THEN 1850 

PRINT "RUMBLE* RUMBLE - YOU'RE STANDING ON SHAKY GROUND . . 
PRINT TAB(5) i "NEW PITS HAVE BEEN FORMED BY THE EARTHQUAKE!!" 

LC3 I*FNA(0) 

LC43«FNA(0) 

IF LC4 3 =L C 31 THEN 1840 
IF FND(0)>1 THEN 1875 

PRINT "WHAT A FLAP YOU'RE IN • • • IT'S BAT MIGRATION TIME!!" 

LC 5 3 »FNA(0) 

LC6 3*FNA(0) 

IF LC63-LC53 THEN 1865 


BAT MIGRATION" 

THE TUMAEROS SWARM IN SEARCH OF FOOD" 


AND BAT MIGRATION 


1875 IF FND(0)»1 THEN 1890 

1880 PRINT "BUZZ* BUZZ - THE TUMAEROS ARE SWARMING" 
1885 LC7 3 *FNA(0) 




1890 RETURN 

2000 REM-PRINT LOCATION 4 HAZARD WARNINGS 

2010 PRINT 

2020 FOR J-2 TO H 

2030 FOR K-l TO 3 

2040 IF SCLCI3 *K3#ABS(LCJ3) THEN 2110 

2045 GOTO J-l OF 2050*2060*2060*2070*2070*2080 

20 50 PRINT "I SMELL A VUMPUS! " 

2055 GOTO 2110 

2060 PRINT "I FEEL A DRAFT” 

2065 GOTO 2110 

2070 PRINT "BATS NEARBY!" 

2075 GOTO 2110 

2080 PRINT "MY ARROWS ARE QUIVERING" 

2110 NEXT K 
2120 NEXT J 
212S L-LC13 

2130 PRINT "YOU ARE IN ROOM "LC13 

2140 PRINT "TUNNELS LEAD TO ”SCL*13;SCL#231SCL*33 

2150 PRINT 

2160 RETURN 

2500 REM-CHOOSE OPTION 

2510 PRINT "SHOOT OR MOVE CS-M>"I 

2520 INPUT IS 

2530 IF IS#"S" THEN 2560 

2540 O-l 

2550 RETURN 

2560 IF IS#"M" THEN 2510 
2570 0-2 

2580 RETURN 
3000 REM-ARROW ROUTINE 
3010 F-0 

3020 REM-PATH OF ARROW 
3030 DIM PC 5 3 

3040 PRINT "NO. OF R00MS<l-5>"; 

3050 INPUT J9 

3060 IF J9<1 OR J9»5 THEN 3040 
3070 FOR K-l TO J9 
3080 PRINT "ROOM #"; 

3090 INPUT PCK3 

3095 IF K <■ 2 THEN 3115 

3100 IF PCK3 «* PCK-23 THEN 3115 

3105 PRINT "ARROWS AREN’T THAT CROOKED - TRY ANOTHER ROOM" 

3110 GOTO 3080 

3115 NEXT K 

3120 REM-SHOOT ARROW 

3130 L-LC13 

3140 FOR K-l TO J9 

3150 FOR Kl-1 TO 3 

3160 IF SCL*KI3-PCX3 THEN 3295 

3170 NEXT K1 

3180 REM-NO TUNNEL FOR ARROW 

3190 L-SCL*FNBC1>3 

3200 GOTO 3300 

3210 NEXT K 

3220 PRINT "MISSED" 

3230 REM-MOVE VUMPUS 
3240 GOSUB 3370 
3250 REM-AMMO CHECK 
3255 A-A-l 

3260 IF A>0 THEN 3280 
3270 F--1 

3280 RETURN 

3290 REM-SEE IF ARROW IS AT L<1> OR L<2> 

3295 L-PCK3 

3300 IF L#LC23 THEN 3340 

3310 PRINT "AHA! YOU GOT THE WUMPUS!” 

3320 F-l 
3330 RETURN 

3340 IF L#LC13 THEN 3210 


3350 PRINT "OUCH! ARROW GOT YOU!” 

3360 GOTO 3270 
3370 REM-MOVE VUMPUS ROUTINE 
3380 K-FNC.C0) 

3390 IF K-4 THEN 3410 
3400 LC23«SCLC23*K3 
3410 IF LC 2 3 #L THEN 3440 

3420 PRINT "TSK TSK TSK- WUMPUS GOT YOU!" 

3430 F— 1 
3440 RETURN 
4000 REM- MOVE ROUTINE 
4020 PRINT "WHERE TO"; 

4030 INPUT L 

4040 IF L«1 OR L>20 THEN 4020 
4050 FOR K-l TO 3 
4060 REM- CHECK IF LEGAL MOVE 
4070 IF SCLC13*K3«L THEN 4130 
4080 NEXT K 

4090 IF L-LC13 THEN 4150 
4100 PRINT "NOT POSSIBLE 
4110 GOTO 4020 
4120 REM-CHECK FOR HAZARDS 
4130 LC 1 3 -L 
4135 F-0 

4140 REM-VUMPUS 
4150 IF L#LC23 THEN 4220 
4160 PRINT "... OOPS! BUMPED A WUMPUS!" 

4170 REM-MOVE WUMPUS 
4180 GOSUB 3380 
4190 IF F-0 THEN 4220 
4200 RETURN 
4210 REM-PIT 

4220 IF L#LC33 AND L#LC43 THEN 4270 
4230 PRINT "YYYIIIIEEEE . . . FELL IN PIT" 

4240 F—1 
4250 RETURN 
4260 REM-BATS 

4270 IF L#LC 5 3 AND L#LC63 THEN 4310 
4280 PRINT "ZAP--SUPER BAT SNATCH! ELSEWHEREVILLE FOR YOU!" 
4290 L-FNAC1) 

4300 GOTO 4130 

4310 IF L# ABS(LC7 3 > THEN 4360 
4320 IF LC 7 3<0 THEN 4350 

4330 PRINT "CHOMP* CHOMP - THAT WAS A TASTY ARROW" 

4340 GOSUB 3255 
4350 LC7 3 —LC 7 3 
4360 RETURN 
5000 END 



TRADED 

See Jan.’74 issue PCC Vol. 2, No. 3, pages 4,5. 

Length: 6819 words. 

TRADE* 

10 COM SCI2#153#TC12*I23*TSC723#BC3*12] 

20 COM W*D9*K9*X9*D1#X»*P9*T9*S9*Y9*H 
30 COM Y1*R9*G9*Q*MC6#33*CC6*33 
35 COM SI*T1*R 
40 REM *** STAR TRADERS *** 

50 REM MAIN MODULE 

120 REM SET UP CALENDAR AND STAR SYSTEM NAMES 
130 DIM CS C36 3 * SS C60 3 

140 LET CS-"JANFEBMARAPRMIYJUNJULAUGSEPOCTNQVDEC” 

150 LET SS-"SOL YORKBOYDIVANREEFHOOKSTANTASKSINKSANDQUINGAOLKIRK" 
160 LET SS C 53 3 «”KR ISFATE” 

170 REM S IS THE STAR SYSTEM INFO ARRAY 
180 REM T IS THE TRADING SHIP INFO ARRAY 

190 REM TS IS THE TRADING SHIP NAME STRING C6 CHARS PER SHIP) 

200 REM P CONTAINS THE FAIR PRICES ON THE LOCAL PLANET 

2T0 REM Q HAS THE FIXED PRICES 

220 REM B CONTAINS THE BANK ACCOUNTS 

230 DIM PC63*QC63 

240 DIM ASC63*DSC53*NSC363*GC63 

250 RESTORE 270 

260 MAT READ Q 

270 DATA 5000#3500*4000#4500 #3000*3000 

280 LET NS-” UR MET HE MED SOFT GEMS” 

290 REM FNZ COMPUTES THE PRICE VINDOW THROUGH VHICH A BID IS 

300 REM ACCEPTABLE FOR FURTHER HAGGLING 

310 DEF FNZ<X>-<FNY(X)*•5*< NOT FNYCX))*X/(2*ABS C S C11 # S1 3) > )/K 1 
320 DEF FNY(X)-X >- ABS<SC11#S1 1 ) 

330 REM R9 IS THE SPEED OF A SHIP IN LIGHTYEARS PER DAY 

340 REM D9 IS THE MINIMUM DISTANCE ALLOWED BETWEEN STARS 

350 REM Q IS THE PROBABILITY OF A DELAY 

360 REM K9 IS THE MAX NUMBER OF BIDDING ROUNDS 

370 REM W IS THE MAX WEIGHT OF A TRADING SHIP’S CARGO 

380 REM X9 CONTROLS THE PROFIT MARGIN) HIGH X9 LIMITS THE * 

390 REM G9 IS THE STELLAR DEVELOPEMENT # INCREMENT 1<«G9<«5 

400 REM *** BLOCK #5 

402 IF R-0 THEN 410 

404 GOSUB 3860 

406 GOTO 2040 

410 GOSUB 5190 

420 GOSUB 3190 

430 S1-Tl«L1* 1 

440 PRINT 

450 PRINT "ALL SHIPS START AT SOL” 

460 PRINT ’’ADVICE) VISIT THE CLASS III AND IV SYSTEMS 

470 PRINT "SOL AND THE CLASS II STARS PRODUCE ALOT OF HE*MED 

AND” 

480 PRINT "SOFT* WHICH THE POORER STAR SYSTEMS (CLASS III AND” 

490 PRINT ”IV) NEED. ALSO# THE POOR STARS PRODUCE THE RAW GOODS 

500 PRINT ”UR*MET*GEMS THAT YOU CAN BRING BACK TO SOL AND” 

510 PRINT "THE CLASS II SYSTEMS IN TRADE” 

520 PRINT 

530 PRINT "STUDY THE MAP AND CURRENT PRICE CHARTS CAREFULLY *” 

540 PRINT "CLASS I AND II STARS MAKE EXCELLENT TRADING PARTNERS" 
550 PRINT ’’WITH CLASS III OR IV STARS." 

560 FOR 11-1 TO T9/P9 
570 FOR Pl-1 TO P9 
580 PRINT 

590 PRINT "PLAYER”)PI)”*WHICH. STAR WILL "3TSCLI*Ll♦53)"TRAVEL TO") 
600 GOSUB 2770 
610 LI-LI*6 
620 T1«T1♦1 


630 NEXT PI 
640 NEXT 11 
650 REM *** BLOCK #6 
660 D-TC9*13 

670 Y-TC10*13 
680 Tl-1 

690 FOR 1-2 TO T9 
700 IF TC10* I 3<Y THEN 740 
710 IF TC10*I]»Y THEN 770 
720 IF TC9*I 3 »D THEN 770 
730 IF TC9*I 3-D AND RND<0)>.5 THEN 770 
740 D-TC9*I 3 
750 Y-TC10*13 
760 Tl-I 
770 NEXT I 
780 IF Yl-Y THEN 900 
790 Dl-1 
800 Yl-Y 
810 T2-TI 
820 GOSUB 3190 
822 IF Yl <«> 2071 THEN 830 
824 GOSUB 4500 

826 PRINT "THE LAST YEAR OF THIS GAME IS ’’)Y9)’’ BUT IF YOU” 

828 PRINT "WANT TO QUIT BEFORE THEN* YOU CAN TYPE ’SAVE* AS” 

829 PRINT "YOUR NEXT PORT OF CALL - THIS WILL PUNCH A TAPE” 

830 PRINT "SO YOU CAN CONTINUE THE GAME LATER" 

031 T1-T2 

840 IF Yl<Y9 THEN 900 

650 GOSUB 4500 

860 PRINT "NEW GAME") 

870 INPUT AS 

880 IF ASC1 *l3«"N” THEN 5500 
890 CHAIN "TRADER” 

900 Dl-D 

910 M-INT((D1-l)/30> 

920 L-3*M*1 

930 PRINT 
940 PRINT 

950 PRINT "*****************•• 

960 PRINT "* ”)CSCL#L+23)D1-30*M)”*")Yl 
970 L-CTl-1)*6*1 
980 Sl-TC8*T13 
990 M-S C6* S13 

1000 PRINT "* ”)TSCL#L*53)" HAS LANDED ON ")SSCM*M+33 

10-10 GOTO TC12#T13*1 OF 1080* 1060* 1040* 1020 

1020 PRINT "3 WEEKS LATE - PIRATES ATTACKED MIDVOYAGE” 

1030 GOTO 1080 

1040 PRINT "2 WEEKS LATE - ’WE GOT LOST.SORRY”’ 

1050 GOTO 1080 

1060 PRINT "1 WEEK LATE - ’OUR COMPUTER MADE A MISTAKE”’ 

1070 REM *** PRINT CARGO STATUS FOR CURRENT SHIP 
1080 PRINT 

1090 PRINT "S ON BOARD")NS)" NET VT" 

1100 PRINT USING 1110)TC11*T13#TC1*T13#TC2*T13*TC3*T13*TC4*T13*TC5*Tl 
TC6*T13*TC7*T13 

1110 IMAGE DDXDDDXDDD* 7(4X* 2D) 

1120 REM *** BLOCK #7 
1130 GOSUB 3870 
1140 PRINT 

1150 PRINT ”WE ARE BUYING*" 

1160 Jl-1 

1170 FOR 11-1 TO 6 

1180 IF SCI1*S13 >* 0 OR TCI1#TI3< • 5 THEN 1480 

1190 PRINT TAB<5)3N$CJl*Jl+533” VE NEED ")-INTISC11 *S13>)” UNITS.") 
1200 PRINT "HOW MANY ARE YOU SELLING") 

1210 GOSUB 4430 

1220 IF X-0 THEN 1480 

1230 IF X <» TCI1*T13 THEN 1270 

1240 PRINT TAB<5))”YOU ONLY HAVE ”)TC11*T13)" UNITS IN YOUR HOLD” 

1250 PRINT TAB(5)) 



1260 GOTO 1200 

1270 IF X <« 2*-INT (SCII/SN) THEN 1300 
1280 X-2--INT (SCI1.S13) 

1290 PRINT TAB ( 5 ) !"WE * LL BID ON "I XI” UNITS.” 

1300 FOR Kl-1 TO K9 

1310 IF K1#K9 MAX 2 THEN 1340 

1320 PRINT TABC5 >/"OUR FINAL OFFERi"I 

1330 GOTO 1350 

1340 PRINT TAB<5>!"VE OFFER "! 

1350 PRINT 100*INTC•009*PCI 13-X-.5)!" VHAT DO YOU BID"! 

1360 INPUT Y 

1370 IF Y <« PCI13-X THEN 1430 
1380 IF Y> <1-FNZ(X>)-PC 113-X THEN 1410 
1390 PCI13-,8-PCIl3-.2-Y/X 
1400 NEXT Kl 

1410 PRINT TAB(5)1"VE * LL PASS THIS ONE” 

1420 GOTO 1480 

1430 PRINT TAB<5)!"VE * LL BUYI" 

1440 TCIl.Tl3-TCI1.T13-X 
1450 TC7.T13-TC7.T13-X-CII<5> 

1460 TCIl.Tl3-TC11.TI3-Y 
1470 SCI1.SI3-SCI1.SI3-X 
1480 Jl-Jl-6 
1490 NEXT II 
1500 PRINT 

1510 REM * — BLOCK #8 

1520 PRINT "VE ARE SELLING«” 

1530 Jl-1 

1540 FOR Il»l TO 6 

1550 IF GC111 <- 0 OR SCI1.SI ]<1 THEN 1960 

1560 PRINT TAB< 5)!NSCJ1.J1-5 3 J " UP TO "IINT(SCII.SIl)i” UNITS."I 
1570 PRINT "HOV MANY ARE YOU DUYING"! 

1580 GOSUli 4430 
1590 IF X-0 THEN 1960 

1600 IF Il>4 OR X-TC7.T13 <- V THEN 1660 

1610 PRINT TAU(5)I"Y0U HAVE "!TC7.TI3!" TONS ABOARD. SO "!XJ 
1620 PRINT " TONS PUTS YOU OVER" 

1630 PRINT TABC5)J"THE "!V!" TON LIMIT.” 

1640 PRINT TAB<5>1 
1650 GOTO 1570 

1660 IF X <• SCI1.SI] THEN 1700 

1670 PRINT TAB<5)!"VE ONLY HAVE "IINT(SC1I.S13)!" UNITS" 

1680 PRINT TABC5 >1 

1690 GOTO 1570 

1700 FOR Kl-1 TO K9 

1710 IF KI#K9 MAX 2 THEN 1740 

1720 PRINT TABC5)J"OUR FINAL OFFER*"! 

1730 GOTO 1750 

1740 PRINT TAB(5 )!"VE WANT ABOUT "! 

1750 PRINT 100-INTC.0I1-PCII3-X-.5>! 

1760 PRINT "YOUR OFFER"! 

1770 INPUT Y 

1780 IF Y >- PCI13-X THEN 1840 
1790 IF Y<( I-FNZCX)>*PCII3-X THEN 1820 
1800 PC 113-.8-PC113-.2-Y/X 
1810 NEXT Kl 

1820 PRINT TABC 5)!"THAT•S TOO LOW" 

1*30 GOTO 1960 

1840 IF Y <■ TC11.T1] THEN 1910 

1850 PRINT TAB(5>!"YOU BID S"!Y!" BUT YOU HAVE ONLY *"!TC1I.TI] 
1.860 GOSUB 4310 

1870 IF SC7.S1 ] <10 OR TC1 I.T13-BC1.B13<Y THEN 1820 
1880 PRINT TAB(5 >! 

1890 GOSUB 4020 

1900 IF Y-TC11.T1] THEN 1820 

1910 PRINT TABC 5 >!"SOLD!" 

1920 TC11.T1]-TCI1.Til-X 

1930 TC7.T13-TC7.T13-X*<11<5 > 

1940 sen.sn-sen.sn-x 

1950 TCIl.Tl3-TCll.TI3-Y 


26 


I960 Jl-Jl-6 
1970 NEXT II 
1980 REM BLOCK #9 

1990 GOSUB 4310 

2000 IF SC7.S13 < l 0 OR TC11.TI3-BC1.B13-0 THEN 2040 
2010 PRINT 
2020 GOSUB 4020 
2030 PRINT 

2040 PRINT "VHAT IS YOUR NEXT PORT OF CALL"! 

2050 GOSUB 2770 
2060 REM —* BLOCK #10.1 
2070 J-0 

2080 FOR 1-1 TO 6 
2090 IF SCI.S13 »• 0 THEN 2120 
2100 IF SCI.SI 3 <GC13 THEN 660 
2110 J-J-l 
2120 NEXT I 
2130 IF J»1 THEN 660 
2140 REM —* BLOCK **10.2 
2150 SC7.S13-SC7.S13+G9 

2160 IF SC7.S13/5#INT(SC7.S13/5) THEN 2220 
2170 GOSUB 4580 
2180 GOSUB 4500 

2190 PRINT "STAR SYSTEM "!SSCSC8.S13,5C8.S13-33!" IS NOV A CLASS"! 
2200 PRINT D*!" SYSTEM" 

2210 REM *** BLOCK #10.3 
2220 IF S9-15 THEN 660 
2230 J-0 

2240 FOR 1-1 TO S9 
2250 J-J-SC7.I3 
2260 NEXT I 

2270 IF J/S9<I 0 THEN 660 

2280 REM A NEV STAR IS BORN I 

2290 SI-S9-S9-1 

2300 GOSUB 4680 

2310 GOSUB 2450 

2320 SC9.S13-D1 

2330 SC10.S13-Y1 

2340 FOR J-t TO 6 

2350 SCJ.SI3-0 

2360 NEXT J 

2370 GOSUB 4500 

2380 PRINT "A NEV STAR SYSTEM HAS BEEN DISCOVERED! IT IS A CLASS IV" 

2390 PRINT "AND ITS NAME IS"!SSCSC8.S13.SC8.SI 3-33 

2400 GOSUD 5190 

2410 GOTO 660 

2420 STOP 

2430 REM *** GOSUBS FOLLOW *** 

2440 REM ^FRONTIER* GOSUB 
2450 X-CRND<0)*».53-100 
2460 Y-50*RND<0> 

2470 IF (ABS(X><25 > AND CY<25> THEN 2450 

2480 F-l 

2490 GOSUB 2550 

2500 IF F-0 THEN 2450 

2510 SC7.S13-0 

2520 RETURN 

2530 REM —* <TEST STAR CO-ORDS> GOSUB 

2540 REM FIRST CONVERT CO-ORDS TO NEXT HALF-BOARD 

2550 GOTO H OF 2660.2620.2600.2560 

2560 Z-X 

2570 X—Y 

2580 Y-Z 

2590 GOTO 2660 

2600 Y—Y 

2610 GOTO 2660 

2620 Z-X 

2630 X-Y 

2640 Y-Z 


2650 REM SECOND TEST PROXIMITY 
2660 FOR J*1 TO Sl-1 

2670 IF SQRC<X-SC11*J3>»2+(Y-SC12/J3 ) ♦2 ) >« D9 THEN 2700 
2680 F-0 

2690 RETURN 
2700 NEXT J 

2710 REM FINALLY ENTER CO-ORDS AND INCREMENT HALF-BOARD COUNTER 
2720 SCI1,S13*INTCX) 

2730 SC12,S13-INTCY) 

2740 H*1♦(H <- 3)*H 

2750 RETURN 

2760 REM *** <NEXT ETA> GOSUB 
2770 INPUT AS 
2780 FOR 1-1 TO S9 
2790 J«SC8,I3 

2800 IF ASC l,43*SSCJ,J+33 THEN 2870 
2810 NEXT I 

2820 IF AS C1< 43 <> "SAVE” THEN 2840 
2830 GOSUB 4770 

2840 PRINT .;ASC1,43;.1" IS NOT A STAR NAME;"; 

2850 PRINT "NEXT STAR”; 

2860 GOTO 2770 
2870 TC8,T13*I 

2880 IF I#S1 THEN 2910 

2890 PRINT "CHOOSE A DIFFERENT STAR SYSTEM TO VISIT" 

2900 GOTO 2850 

2910 D2-SQRCCSC11,S13-SCI 1,13)»2+CSC12*SI3-SC12,I3)»2)/R9 
2920 D2«INT(D2) 

2930 IF RNDC0)»Q/2 THEN 3030 
2940 1*1 ♦ INT ( P.ND < 0 ) *3 > 

2950 GOTO I OF 3000#2980*2960 

2960 PRINT "SHIP DOES NOT PASS INSPECTION"; 

2970 GOTO 3010 

2980 PRINT "CREWMEN DEMAND A VACATION"; 

2990 GOTO 3010 

3000 PRINT "LOCAL HOLIDAY SOON"; 

3010 PRINT " - "1IJ" WEEK DELAY." 

3020 D2-D2+7*! 

3030 TC 9,T13*TC 9,T13+D2 

3040 IF TC 9# T13 <* 360 THEN 3070 

3050 TC 9,T13 *T C 9,T13-360 

3060 TC10,T13*TC10,T13+1 

3070 M*INT CCTC9,T13“1)/30 ) 

3080 L*3*M+1 

3090 PRINT "THE ETA AT "3SSCJ*J+33;" IS ";CSCL,L+23;" ";TC9,T13-30*M; 
TC10,T13 

3100 REM UPDATE ETA PLUS RANOM DELAY FACTOR <0,1,2 OR 3 WEEKS) 

3110 I*<INTCRNDC 0>*3)+1)*<RNDC0>>Q/2) 

3120 TC9,Tl3-TC9,Tl3+7*1 

3130 IF TC9,T13 <* 360 THEN 3160 

3140 TC9,T13-TC9,T13-360 

3150 TC10 , T13*TC10 , T13+1 

3160 TC12,T13«I 

3170 RETURN 

3180 REM **+ «P.EPORT> GOSUB 
3190 GOSUB 4500 

3200 PRINT TAB(10)3"JAN I* "3Y13TABC 35)3"YEARLY REPORT #"3Yl-2069 
3210 PRINT 
3220 PRINT 

3230 IF Yl>2070 THEN 3450 


3240 

PRINT 

"STAR SYSTEM CLASSES*" 

3250 

PRINT 

" I 

COSMOPOLITAN" 

3260 

PRINT 

" II 

DEVELOPED" 

3270 

PRINT 

" III 

UNDERDEVELOPED' 

3280 

PRINT 

" IV 

FRONTIER" 

3290 

PRINT 



3300 

PRINT 



3310 

PRINT 

"MERCHANDISE*" 

3320 

PRINT 

'• UP. 

URANIUM" 

3330 

PRINT 

" MET 

METALS" 


3340 

3350 

3360 

3370 

3380 

3390 

3400 

3410 

3420 

3430 

3440 

3450 

3460 

3470 

3480 

3490 

3500 

3510 

3520 

3530 

3540 

3550 

3560 

3570 

3580 

3590 

3600 

3610 

3620 

3630 

3640 

3650 

3660 

3670 

3680 

3690 

3700 

3710 

3720 

3730 

3740 

3750 

3760 

3770 

3780 

3790 

3800 

3810 

3820 

3830 

3840 

3850 

3860 

3870 

3880 

3890 

3900 

3910 

3920 

3930 

3940 

3950 

3960 

3970 

3980 

3990 

4000 

4010 

4020 

4030 


PRINT " HE HEAVY EQUIPMENT" 

PRINT " MED MEDICINE" 

PRINT " SOFT COMPUTER SOFTWARE" 

PRINT " GEMS STAR GEMS" 

PRINT 
PRINT 

PRINT TAB(5);"EACH TRADING SHIP CAN CARRY MAX ";v;" TONS CARGO 
PRINT "STAR GEMS AND COMPUTER SOFTWARE, WHICH AREN'T SOLD BY T 
PRINT "TON, DON'T COUNT." 

PRINT 

PRINT 

PRINT TAB<20);"CURRENT PRICES" 

PRINT 

PRINT 

PRINT "NAME CLASS";NS 
PRINT 

FOR S1«1 TO S9 
GOSUB 3870 
FOR 1*1 TO 6 

pcn-sGN<sci,sn)*pcn 

NEXT I 
GOSUB 4580 

PRINT USING "#,4A,2X";SSCSC8,SM,SC8,S1 1+33 

PRINT USING "5A,6(S5D)";DS,PC1 3,PC23,PC 33,PC43,PC53,PC 6J 

IF S1/2 <» INTCS1/2) THEN 3600 

PRINT 

NEXT SI 

PRINT 

PRINT MEANS SELLING AND MEANS BUYING)" 

PRINT 

PRINT 

PRINT TAB(22);"CAPTAINS" 

PRINT 

PRINT 

PRINT "NUMBER S ON SHIPS S IN BANK CARGOES TOTALS" 

FOR B1-1 TO P9 
GOSUB 4360 
NEXT B1 

FOR PI-1 TO P9 
PRINT 
Ml*M2«0 

FOR 11*0 TO T9/P9-1 
Ml*Ml+TC11,P9*I1+P1 3 
FOR K-l TO 6 

M2-M2+TCK,P9*I1+P13*QCK3 
NEXT K 
NEXT II 

M3-M2+M1+BC1,P13 

PRINT USING 3830;P1,M1,BC1,P13,M2,M3 
IMAGE 2X,2D,2X,4 C2X,DDXDDDXDDD) 

NEXT PI 
RETURN 

REM *** <PRICES> GOSUB 
Rl*l+CSC7,Sl3 >* 5)+<SC7,Sl3 >* 10) 
D2*12*<Y1-SC10,5I3)+(D1-SC9,S13>/30 
FOR 1-1 TO 6 

GCI3«(1+SC7,S13/15)*CMC I,R13*SC7,S13+CCI,R13) 

IF ABS(G CI 3)> • 01 THEN 3940 
PC I 3*0 
GOTO 3970 

SCI,Sl 3»SGNCGCI3)*CABS<GC I 3 * 1 2 ) MIN ABS C S CI ,SI 3+D2*G C I 3)) 

PCI3-QCI 3 *Cl-SGNCSCI,SI 3)*ABS(SCI,SI3/CGCI3*X9))) 

PC I 3*100*INTCPC I 3/100+ .5) 

NEXT I 
S C 9, S1 3 *D 1 
SC10,S13*Y1 
RETURN 

REM *** <BANK CALL> GOSUB 

PRINT "DO YOU WISH TO VISIT THE LOCAL BANK"; 

INPUT AS 



4040 IF AS C I # 1 3 «"Y" THEN 4060 
4050 RETURN 
4060 GOSUB 4310 
4070 GOSUB 4380 

4080 PRINT TAB( 5>!"YOU HAVE ”!BCl#B13I” DOLLARS IN THE BANK" 
4090 IF BC1#B13«0 THEN 4190 

4100 PRINT TAB(5)7"HOW MUCH DO YOU WISH TO WITHDRAW"! 

4110 INPUT Z 

4120 IF Z <• BC1,BM THEN 4150 
4130 PRINT TAB( 5 >! "TOO MUCH! "! 

4140 GOTO 4100 
4150 IF Z <■ 0 THEN 4190 
4160 BCI#B13«BCl<D|]-Z 
4170 TC11#T13-TCU#TI3«-Z 

4180 RETURN 

4190 PRINT TABC5)!"HOW MUCH DO YOU WISH TO DEPOSIT"! 

4200 INPUT Z 

4210 IF Z >» 0 THEN 4240 

4220 PRINT "YOU CAN'T DEPOSIT A NEGATIVE NUMBER" 

4230 GOTO 4190 

4240 IF Z «■ TC11#TI 3 THEN 4270 

4250 PRINT TAB( 5 ) !*'YOU HAVE S"1TCII«TIJJ" ON YOUR SHIP" 

4260 GOTO 4190 
4270 TC11#T13-TCl1#T13-Z 
4280 BC1#B1 3«BC1#B1 3+Z 
4290 RETURN 

4300 REM **« <B1> GOSUB 
4310 Bl-Tl 

4320 FOR I-l TO S9/P9 
4330 IF BI <■ P9 THEN 4360 
4340 BI-B1-P9 
4350 NEXT I 
4360 RETURN 

4370 REM ***<BANK UPDATE> GOSUB 

4380 BC1#B1 3«BC1#BI 3 ♦<!■*■. 05* <Y1-BC3#B1 3♦ < D1 -BC2, B1 3 >/360 ) ) 
4390 BC2# B13 *D1 
4400 BC3#B1 3 = Y1 
4410 RETURN 

4420 REM *** <INPUT> GOSUB 
4430 INPUT X 

4440 IF INTCX3-X AND X >■ 0 THEN 4480 

4450 PRINT TAB( 5)!"TYPE A ZERO IF YOU WANT TO PASS THIS ONE#" 
4460 PRINT TABC5)!"BUT NO NEGATIVES OR DECIMALS" 

4470 GOTO 4430 
4480 RETURN 

4490 REM *** <GA> GOSUB 
4500 PRINT 
4520 PRINT 

4530 PRINT TAB<20>,"*-* GENERAL ANNOUNCEMENT ***" 

4540 PRINT 
4550 PRINT 
4560 RETURN 

4570 REM *** <DJ> GOSUB 

4580 GOTO SC7#S13/5*1 OF 4650#4630#4610#4590 
4590 DS«" I" 

4600 RETURN 
4610 DS■" II" 

4620 RETURN 
4630 DS«" III" 

4640 RETURN 
4650 DS-" IV" 

4660 RETURN 

4670 REM <STAR NAME> GOSUB 

4680 IF Sl»l THEN 4710 

4690 I-l 

4700 GOTO 4750 

4710 I-4*INTC14*RND<0>>*5 

4720 FOR J-2 TO Sl-l 

4730 IF I-SC8#J3 THEN 4710 


4740 NEXT J 
4750 SC8#S13-1 

4760 RETURN 

4770 REM *** <SAVE GAME ON TAPE* GOSUB 


4780 

PRINT 

"WHEN 

I TYPE 

*?• 

THIS IS WHAT YOU SHOULD 

DO:" 

4790 

PRINT 




•ON' BUTTON ON 




4800 

PRINT 

" 1 . 

PUSH 

THE 

THE 

TAPE PUNCHER" 

4810 

PRINT 

" 2. 

PRESS 

THE 

•HERE IS' KEY 

(UPPER RIGHT) 3 TIMES' 

4820 

PRINT 

" 3. 

PUSH 

THE 

•OFF* BUTTON ON 

THE TAPE 

PUNCHER" 

4830 

PRINT 

" 4. 

TYPE - 

ANY 

NUMBER" 




4840 

PRINT 

" 5. 

PRESS 

THE 

•RETURN* KEY" 




4850 

PRINT 








4860 

PRINT 

"WHEN 

I TYPE 

'!!t' THAT MEANS I 

'LL 

START 

PUNCHING" 

4870 

PRINT 

"THE TAPE IN 

ABOUT 10 SECONDS# 

SOI* 



4860 

PRINT 








4890 

PRINT 

" ** 

* DON'T 

FORGET TO TURN 

THE 

PUNCHER BACK ON" 

4900 

PRINT 

LINO) 







4910 

INPUT 

X 







4920 

PRINT 

"III" 








4930 FOR I-l TO 10000 
4940 X«X*1 

4950 NEXT I 
4960 PRINT TS!"" 

4970 PRINT V!"#"!D9!"#"!K9i"#"!X9!"#"!Dl!"#"!Y1!"" 

4980 PRINT P9!"#”!T9!"#"!S9!"#"!Y9!"#"!T1!"#"!S1!"" 

4990 FOR J-l TO S9 
5000 FOR 1-1 TO 9 STEP 4 

5010 PRINT SCI#J3!"#"!SCI*l#J3!"#"!SCI*2#J3!"#"!SCI*3#J3!"" 

5040 NEXT I 

5060 NEXT J 

5070 FOR J-1 TO T9 

5080 FOR I-l TO 9 STEP 4 

5090 PRINT TCI#J3!"#";TCI+l#J3!"#"!TCI+2#J3!"#"!TCI+3#J3!"" 

5120 NEXT I 

5140 NEXT J 

5150 FOR I-l TO P9 

5160 PRINT BC1#I3!"#"!BC2#I3!"#”!BC3#I3!"" 

5170 NEXT I 

5172 FOR I-l TO 50 

5174 PRINT " "! 

5176 NEXT I 
5180 STOP 

5190 REM *** <PRINT STAR MAP> GOSUB 
5200 PRINT LINO > 

5210 PRINT TAB(22)!"STAR MAP" 

5220 PRINT TABC20>!"************” 

5230 PRINT 

5240 DIM LSC553 

5250 FOR Ll-15 TO -15 STEP -1 

5260 IF LI <> 0 THEN 5290 

5270 LS -" 1-1-1-1-1--* SOL-1-1.-1-1-I 

5280 GOTO 5340 
5290 LS-" 

5300 IF ABSCL1)/3«INT(ABSCLl>/3> THEN 5330 
5310 LS C 26# 263-"1" 

5320 GOTO 5340 
5330 LSC26#263»"-" 

5340 Y-Ll *10/3 
5350 FOR SI-2 TO S9 

5360 IF Y<SC12# S13 OR ABSCY-SC12#S13)>10/3 THEN 5400 
5370 XI-XNT(26*S Cll#S13/2> 

5380 LSC XI# X13 

5390 LSCXI*l#XI+43-SSCS(8#SI3#SC8#S13+33 
5400 NEXT S1 

5410 FOR 1-55 TO 26 STEP -l 

5420 IF LSCI#13 <> " " THEN 5440 

5430 NEXT I 

5440 PRINT LS CI#I 3 

5450 NEXT LI 





5460 PRINT 

5470 PRINT "THE MAP IS 100 LIGHT-YEARS BY 100 LIGHT-YEARS," 
5480 PRINT "SO THE CROSS-LINES MARK 10 LIGHT-YEAR DISTANCES" 
5490 RETURN 
5500 END 


TRADER 

See Jan.’74 issue PCC Vol. 2, No. 3, pages 4,5. 

Length: 3290 words. 

TRADER 

10 COM S(I2,153,T(12«123,TS(723,0(3,12] 

20 COM V,D9,K9,X9,Dl,X1,P9,T9,S9,Y9,H 
30 COM YI,R9,G9,Q,MC6,3],CC6,31 
35 COM S1,TI,R 
40 REM **• STAR TRADERS *** 

50 REM «<<GAME SET-UP M0DULE>>> 

60 REM S IS THE STAR SYSTEM INFO ARRAY 

70 REM T IS THE TRADING SHIP INFO ARRAY 

60 REM TS IS THE TRADING SHI? NAME STRING 

90 REM M AND C DETERMINE A STAR’S PRODUCTIVITY/MONTH 

92 REM PROD/MO. - SC7,J> * M(I,R1> ♦ CCI,R1) 

94 REM WHERE J IS THE STAR ID #,I THE MERCHANDISE •, 

96 REM AND R1 IS THE DEVELOPMENT CLASS OF THE STAR 
100 REM B CONTAINS THE BANK ACCOUNTS 
110 REM AS IS THE STANDARD INPUT BUFFER 
120 DIM AS C6 3 

130 REM R9 IS THE SPEED OF A SHIP IN LIGHT-YEARS PER DAY 

140 REM D9 IS THE MINIMUM DISTANCE ALLOWED BETWEEN STARS 

150 REM Q IS THE PROBABILITY OF A DELAY 

160 REM K9 IS THE MAX NUMBER OF BIDDING ROUNDS 

170 REM V IS THE MAX WEIGHT OF A TRADING SHIP 

180 REM X9 CONTROLS THE PROFIT MARGIN,* HIGH X9 LIMITS THE * 

190 REM G9 IS THE STELLAR DEVELOPMENT INCREMENT l«»G9«-5 

195 REM R«l IF THIS IS A RESTART 

200 LET P.9-2/7 

210 LET D9-15 

220 LET Q-.l 

230 LET K9-3 

240 LET W-30 

250 LET X9«36 

260 LET G9-1.25 

265 LET R-0 

270 REM D1 IS THE DAY OF THIS YEAR C1<-D1«»360> 

280 REM Y1 IS THIS YEAR 
290 LET Dl ■ I 
300 LET Yl-2070 

302 REM SET UP ECONOMETRICS MODEL 
304 RESTORE 2410 
306 MAT READ M,C 
310 REM — * BLOCK #1 

320 PRINT "INSTRUCTIONS (TYPE *Y' OR 'N* PLEASE)"! 

330 INPUT AS 

340 IF AS(1,13 »"N" THEN 590 
350 PRINT 

360 PRINT " THE DATE IS JAN l, 2070 AND INTERSTELLAR FLIGHT" 

370 PRINT "HAS EXISTED FOR 70 YEARS. THERE ARE SEVERAL STAR" 

380 PRINT "SYSTEMS THAT HAVE BEEN COLONIZED. SOME ARE ONDY" 

390 PRINT "FRONTIER SYSTEMS, OTHERS ARE OLDER AND MORE DEVELOPED. 
400 PRINT 

410 PRINT " EACH OF YOU IS THE CAPTAIN OF TWO INTERSTELLAR" 

420 PRINT "TRADING SHIPS. YOU WILL TRAVEL FROM STAR SYSTEM TO" 
430 PRINT "STAR SYSTEM, BUYING AND SELLING MERCHANDISE. IF YOU" 
440 PRINT "DRIVE A GOOD BARGAIN YOU CAN MAKE LARGE PROFITS." 

450 PRINT 


460 

470 

480 

490 

500 

510 

520 

530 

540 

550 

560 

570 

580 

590 

600 

605 

610 

620 

630 

640 

645 

650 

660 

670 

675 

680 

690 

700 

710 

720 

730 

740 

750 

760 

770 

775 

780 

790 

800 

810 

820 

830 

835 

840 

845 

850 

855 

860 

870 

875 

880 

885 

690 

900 

910 

920 

925 

930 

940 

950 

955 

960 

970 

980 

990 

1000 

1005 

1010 

1020 


29 

PRINT " AS TIME GOES ON, EACH STAR SYSTEM WILL SLO”LY" 

PRINT "GROW, AND ITS NEEDS WILL CHANGE. A STAR SYSTEM THAT" 
PRINT "HOW IS SELLING MUCH URANIUM AND RAW METaLS CHEAPLY" 

PRINT "MAY NOT HAVE ENOUGH FOR EXPORT IN A FEW YEARS." 

PRINT 

PRINT " YOUR SHIPS CAN TRAVEL ABOUT TWO LIGHTYEARS IN «" 

PRINT "WEEK AND CAN CARRY UP TO",*v;" TOMS OF CARGO. ONLY" 

PRINT "CLASS I AND CLASS II STAR SYSTEMS HAVE BaNKS ON THEM." 
PRINT "THEY PAY 5X INTEREST AND ANY MONEY YOU DEPOSIT ON ONE" 
PRINT "PLANET IS AVAILABLE ON ANOTHER - PROVIDED THERE’S A LOCaL* 
PRINT "BANK." 

PRINT 

REM -*- BLOCK #2 

PRINT "HAVE ALL PLAYERS PLAYED BEFORE"! 

INPUT AS 
PRINT 

IF AS(1,13«"Y" THEN 630 
GOTO 660 

PRINT "DO YOU WANT TO SET UP YOUR OWN GAME"! 

INPUT AS 
PRINT 

IF ASC I , 1 J-’’Y’’ THEN 760 
PRINT "HOW MANY PLAYERS"! 

INPUT P9 
PRINT 

GOTO P9-I OF 710,710,710 
PRINT "2,3, OR 4 CAN PLAY" 

GOTO 660 

T9-2-P9 

S9-3-P9-1 

Y9-Y1+5 

GOTO 1350 

REM *** BLOCK #3 

PRINT "IS THIS A RESTART"! 

INPUT AS 
PRINT 

IF AS(1,1]*”N" THEN 940 

PRINT "LOAD THE TAPE INTO THE TAPE READER. WHEN I TYPE A ’7’" 
PRINT "YOU CAN FLIP THE SWITCH TO ’START* WHENEVER YOU’RE READY- 
PRINT 
INPUT TS 

INPUT W,D9,K9,X9,D1,Y1 * 

INPUT P9,T9,S9,Y9,T1,S1 

FOR J«1 TO S9 

FOR I»1 TO 9 STEP 4 

INPUT S(I,J3,S(I*l,J3,S( I+2,J3,S(I«-3,J3 
NEXT I 
NEXT J 

FOR J«1 TO T9 

FOR l-l TO 9 STEP 4 

INPUT T(I,J3,T(I-l,J3,T(I*2,J],T(I*3,J3 
NEXT I 
NEXT J 

FOR 1-1 TO P9 

INPUT B(1,I3,B(2,I3,B(3,I3 

NEXT I 

R-l 

CHAIN "-TRADE*" 

PRINT "HOW MANY PLAYERS"! 

INPUT P9 
PRINT 

IF P9 >« 2 AND P9 <» 12 THEN 990 
PRINT "2,3,4, ... ,12 CAN PLAY" 

GOTO 940 

PRINT "HOW MANY SHIPS PER PLAYER"! 

INPUT X 
PRINT 

IF X<1 THEN 990 
T9-P9-X 


1030 IF T9 <• 12 THEN 1070 

1040 PRINT "l CAN'T KEEP TRACK OF MORE THAN 12 SHIPS;" 

1050 PRINT P9;" PLAYERS TIMES"IX;" SKIPS MAKES"!T9 
1060 GOTO 990 

1070 PRINT "HOV MANY STAR SYSTEMS"; 

1060 INPUT S9 
1085 PRINT 

1090 IF 59 >- 4 AND S9 <« 13 THEN 1120 
1100 PRINT "FROM 4 TO 13 STARS" 

1110 GOTO 1070 

1120 PRINT "ENTER THE LENGTH OF GAME IN YEARS"! 

1130 INPUT X 
1135 PRINT 

1140 IF X >■ 1 AND INT(X)«X THEN 1170 
1150 PRINT "CHOOSE A POSITIVE INTEGER" 

1160 GOTO 1130 
1170 Y9-YH-X 

1160 PRINT "VHAT'S THE MAX CARGOS TONNAGE(USUALLY 30)"! 

1190 INPUT V 
1195 PRINT 

1200 IF V«25 THEN 1180 

1210 PRINT "VHAT'S THE MINIMUM DISTANCE BETVEEN STARS(USUALLY 15)"! 
1220 INPUT D9 
1225 PRINT 

1230 IF D9 <« 25 AND D9 >• 10 THEN 1260 
1240 PRINT "MIN SPACING 10* MAX 25" 

1250 GOTO 1210 

1260 PRINT "HOV MANY BIDS OR OFFERS<USUALLY 3)"i 
1270 INPUT K9 
1275 PRINT 

1280 IF K9«1 THEN 1260 

1290 PRINT "SET THE PROFIT MARGINt1,2*3*4 OR 5)...THE HIGHER" 

1300 PRINT "THE NUMBER* THE LOVER THE PROFIT X ... USUALLY SET TO 2" 
1310 PRINT "...YOUR NUMBER"! 

1320 INPUT X9 

1330 X9-18*(ABS(X9) MIN 5) 

1340 REM -*- BLOCK #4.1 

1350 SCI 1*1l-SCl2*ll-0 

1360 SC7*1J-15 

1370 REM — • BLOCK #4.2 

1380 H-l 

1390 SI-2 

1400 GOSUB 1920 

1410 SI-3 

1420 GOSUB 1920 

1430 Sl-4 

1440 GOSUB 2010 

1450 FOR Sl-5 TO S9 

1460 GOSUB SI-3-INT<(SI-1>/3 ) OF 1920*2010*2060 

1470 NEXT SI 

1480 REM -*- BLOCK #4.3 

1490 FOR Sl-I TO S9 

1500 FOR J-l TO 6 

1510 SCJ*SU-0 

152fl NEXT J 

1530 IF Sl>l THEN 1560 

1540 1-1 

1550 GOTO 1600 

1560 I-4*INT(14-RND(0)>♦S 

1570 FOR J-2 TO SI-1 

1580 IF I-SC8*J1 THEN 1560 

1590 NEXT J 

1600 SC8*S1 ]>I 

1610 SC9*SI 3-27 0 

1620 SC10*S1J-Yl-1 

1630 NEXT SI 

1640 REM --* BLOCK #4.4 

1650 Ti-L-I 

1655 PRINT 


1657 PRINT 

1660 PRINT "CAPTAINS* NAME YOUR SHIPS (UP TO 6 LETTERS)" 

1670 FOR I-l TO T9/P9 V 

1680 PRINT 

1690 FOR Pi-1 TO P9 

1700 TCl*Tl )-TC2*Tl)-TC6*Tl 1-0 

1710 TC3*T!1-15 

1720 TC4*T1 1-TC5*TI1-10 

1730 T C 7*T11-25 

1740 TC9*T11-D1 

1750 TC10*T11-Y1 

1760 TCI1*TI1-5000 

1770 PRINT " CAPTAIN"!PI!"VHAT DO YOU CHRISTEN YOUR SHIP #"!I! 

1780 INPUT T$C L* L-51 

1790 T1-T1♦l 

1800 L-L-6 

1810 NEXT PI 

1820 NEXT I 

1830 REM — BLOCK #4.5 

1840 FOR Bl-1 TO P9 

1850 BC1*B11-0 

I860 BC2*B11-D1 

1870 B C 3* B11-Y1 

1880 NEXT B1 

1890 CHAIN "-TRADE-" 

1900 REM — GOSUBS FOLLOW — 

1910 REM <FRONTIER> GOSUB 
1920 X-(RND(0)-.5)-100 
1930 Y-50-RND(0) 

1940 IF (ABS(X)<25> AND (Y<25> THEN 1920 

1950 F-l 

1960 GOSUB 2190 

1970 IF F-0 THEN 1920 

1980 SC7*S!1-0 

1990 RETURN 

2000 REM — <UNDERDEVELOPED* GOSUB 

2010 E-100 

2020 GOSUB 2110 

2030 SC7*S11*5 

2040 RETURN 

2050 REM — <DEVELOPED* GOSUB 

2060 E-50 

2070 GOSUB 2110 

2080 SC7*S11-10 

2090 RETURN 

2100 REM — <GENERATE CO-ORDS* GOSUB 

2110 X-(RND(0)-»5 >-E 

2120 Y-RND(0)-E/2 

2130 F-l 

2140 GOSUB 2190 

2150 IF F-0 THEN 2110 

2160 RETURN 

2170 REM *** «TEST STAR CO-ORDS* GOSUB 

2180 REM FIRST CONVERT CO-OP.DS TO NEXT HALF-BOARD 

2190 GOTO H OF 2300*2260*2240*2200 

2200 Z-X 

2210 X--Y 

2220 Y-Z 

2230 GOTO 2300 

2240 Y«-Y 

2250 GOTO 2300 

2260 Z-X 

2270 X-Y 

2280 Y-Z 

2290 REM SECOND* TEST PROXIMITY 
2300 FOR J-l TO SI-1 

2310 IF SOR((X-SCl1 *J1>»2-(Y-SCl2*J1>♦2> >* D9 THEN 2340 
2320 F-0 

2330 RETURN 


2340 

2350 

2360 

2370 

2360 

2390 

2400 

2410 

2420 

2430 

2440 

2450 


NEXT J 

REM FINALLY, ENTER CO-ORDS AND INCREMENT HALF-BOARD CTR 


SC l l,SI3-INTCX) 

SC 12,SIl-INT(Y) 

H«1♦ (H <- 3)*H 
RETURN 

REM *** DATA FOR ECONOMETRIC MODEL FOLLOWS *** 

REM MODEL #1 

DATA 2,-•1,0,-•!>-•! •l»•l*-•l*•l• 

DATA 1,1.5,.5,.75,.75,.75,-.75,-.75,-.75,-.5,-1.5,. 
DATA -.5,.5,1.5,-.5 
END 


1 , 

5, 


. 1 ,-. 1,0 

-n/-i .5 


STAR TRADER 

Procedure to put the paper tape programs on HP 2000 F 
Time-Shared Basic and save them on the disc. 


j Type SCRATCH 

* Type NAME-TRADER 

Type TAPE 

Load paper tape TRADER into tape reader. 

Wait while tape is read in. 

Type LEN 

Type SAVE 

2. Type SCR 

Type NAME-TRADE* 

Type TAPE 

Load paper tape TRADE* into tape reader. 

Wait while tape is read in. 

Type LEN 

Type SAVE 

3 Unless you have errors, you can now type GET-TRADER 
Type RUN 


People’s Computer Company 
Box E 

Menlo Park, CA 94025 





