Home » Personal collection » Commodore disks » disk52a2_c16_progs.d64 » buses & trains
buses & trains
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Personal collection » Commodore disks » disk52a2_c16_progs.d64 |
Filename: | buses & trains |
Read OK: | ✔ |
File size: | 0785 bytes |
Load address: | 1001 |
Exec address: | 0000 |
Duplicates
There is 1 duplicate copy of this file in the archive:
- Personal collection » Commodore disks » disk52a2_c16_progs.d64 » buses & trains
- Personal collection » Commodore tapes » Commodore_16 » drawer_br_tape10b_d46_c16_ghost_maze.wav » buses & trains
File contents
10 SCNCLR 20 GOSUB 860:PRINT"JOURNEY MODEL INFORMATION" 30 PRINT"(TIME IN MINUTES)" 40 PRINT:PRINT"BUS":PRINT 50 PRINT"WALK TO BUS STOP":INPUT W1B 60 PRINT"TIME BETWEEN BUSES":INPUT FB 70 PRINT"SHORTEST BUS TIME":INPUT SB 80 PRINT"LONGEST BUS TIME":INPUT LB:LET DB=LB-SB+1 90 PRINT"PERCENT OF BUSES CANCELLED":INPUT PB 100 PRINT"WALK FROM BUS STOP":INPUT W2B 110 PRINT:PRINT"TRAIN":PRINT 120 PRINT"WALK TO STATION":INPUT W3T 130 PRINT"TRAIN TIMES (HRS.MINS)":FOR I=1 TO 6:INPUT TT:GOSUB 840:LET T(I)=TT 140 REM IO 150 NEXT I 160 PRINT"TIME TRAIN TAKES":INPUT TJ 170 PRINT"PERCENTAGE OF TRAINS ON TIME":INPUT PT 180 PRINT"PERCENTAGE OF TRAINS MORE THAN 5 MINUTES LATE":INPUT P5 190 PRINT"PERCENTAGE OF TRAINS CANCELLED":INPUT PC 200 PRINT"WALK FROM STATION":INPUT W4T 210 PRINT:PRINT 220 PRINT"TIME TO ARRIVE (HH.MM) ":INPUT A$ 230 LET TT=VAL(A$):GOSUB 840:LET TA=TT 240 PRINT"TIME TO LEAVE (HH.MM) ":INPUT L$ 260 PRINT"HOW MANY JOURNEYS":INPUT NJ 270 FOR I=1 TO 2:FOR J=1 TO 3 280 LET L(I,J)=0 290 NEXT J:NEXT I 300 FOR K=1 TO NJ 310 LET TS=TL 320 LET OV=RND(1)*100 330 IF OV<2 THEN LET TS=TS+RND(1)*30 340 LET T=TS 350 GOSUB 610 360 LET T=TS 370 GOSUB 700 380 FOR I=1 TO 2 390 IF J(I)<=0 THEN LET L(I,1)=L(I,1)+1 400 IF J(I)>0 AND J(I)<=5 THEN LET L(I,2)=L(I,2)+1 410 IF J(I)>5 THEN LET L(I,3)=L(I,3)+1 420 NEXT I 430 NEXT K 440 PRINT:PRINT"RESULTS:" 450 PRINT:PRINT"OUT OF ";NJ;" JOURNEYS" 460 PRINT"LEAVEING AT ";L$ 470 PRINT"TO ARRIVE AT ";A$ 480 PRINT 490 FOR I=1 TO 2 500 IF I=1 THEN PRINT"BY BUS" 510 IF I=2 THEN PRINT"BY TRAIN" 520 PRINT 530 PRINT"ON TIME ";L(I,1) 540 PRINT"LESS THEN 5 MINS LATE ";L(I,2) 550 PRINT"MORE THEN 5 MINS LATE ";L(I,3) 560 PRINT 570 NEXT I 580 PRINT"RUN MODEL AGAIN (Y/N)":INPUT A$ 590 IF A$="Y" THEN GOTO 210 600 STOP 610 LET T=T+W1B 620 IF RND(1)*100<PB THEN LET T=T+FB 630 LET WT=INT(RND(1)*FB) 640 LET T=T+WT 650 LET BJ=SB+INT(DB*(RND(1)+RND(1))*0.5) 660 LET T=T+BJ 670 LET T=T+W2B 680 LET J(1)=T-TA 690 RETURN 700 LET T=T+W3T 710 LET I=0 720 LET I=I+1:IF I=7 THEN PRINT "NO MORE TRAINS":STOP 730 IF T(I)<T THEN GOTO 720 740 LET TT=T(I) 750 IF RND(1)*100<PC THEN LET TT=T(I+1) 760 LET DL=0:LET R=RND(1)*100 770 IF R>PT THEN LET DL=INT(RND(1)*5) 780 IF R>(100-P5) THEN LET DL=INT(RND(1)*20+5) 790 LET T=TT+DL 800 LET T=T+TJ 810 LET T=T+W4T 820 LET J(2)=T-TA 830 RETURN 840 LET TT=INT(TT)*60+INT(100*(TT-INT(TT))+0.5) 850 RETURN 860 DIM L(2,3):DIM J(2):DIM T(6) 870 RETURN
� . � 860:�"JOURNEY MODEL INFORMATION"