8-Bit Software Online Conversion

:2.$.Ladder - Listing

1REM SNAKES & LADDERS 2REM JAMES M.CAVANAGH 3REM 30-Oct-1993 05:49:34 4ONERROR IF ERR=17 THEN RUN ELSE VDU 7:REPORT:PRINT" at line ";ERL:END 5IF PAGE<&E01 THEN GOTO 10 ELSE 6 6*K.9*T.|MF.A%=0TO(TOP-PA.)ST.4:A%!& D00=A%!PA.:N.|MPA.=&D00|MO.|MDEL.6,9|MVD U6|MRUN|M 7VDU21 8*FX138,0,137 9END 10MODE2:VDU23;8202;0;0;0;H%=0:J%=0:DI MA(4,65):RAND=RND(-TIME) 20A=0:TIME=0:CLS:MO=1:RN=0:TR=0:RN2=0 :TR1=0:POS1=0:POS2=0:U$=CHR$8+CHR$10:RES TORE 30IFH%>0ORJ%>0THEN80 50COLOUR2:GCOL0,1:PRINTTAB(2,8);"WELC OME";TAB(12,8);"TO":VDU5:GCOL0,1:Q=INKEY (100):VDU19,3,4;0; 60Y$=" S N A K E S A N D L A D D E R S":FORX=1TO39:MOVEX*1280/40,(300*SIN(X /6))/2+800:PRINTMID$(Y$,X,1):NEXT:GCOL0, 3:PRINT''''''"Enter Players Names:":GCOL 0,2:INPUT'"1) "Z$,'"2) "Y$ 70IFRND(4)=1 A$=Z$:B$=Y$ ELSE A$=Y$:B $=Z$ 80VDU4:CLS:VDU5:GCOL3,1:MOVE0,80:PRIN T" PLEASE WAIT":@%=0 90VDU19,0,2;0;19,2,0;0;19,3,3;0; 100GCOL0,2:MOVE100,112:MOVE100,912:PLO T85,980,912:MOVE980,112:PLOT85,100,112:G COL0,5:FORY=113TO912STEP200:FORX=101TO98 0STEP220:PROCdraw:NEXT:NEXT 110FORY=213TO912STEP200:FORX=211TO980S TEP220:PROCdraw:NEXT:NEXT 120GCOL0,7:FORY=143TO942STEP200:FORX=8 72TO101STEP-110:A=A+1:A(1,A)=X+2:A(2,A)= Y+35:MOVEX+25,Y:PRINTCHR$225:NEXT:A=A+8: NEXTY:A=8 130FORY=243TO1042STEP200:FORX=101TO871 STEP110:A=A+1:A(1,A)=X+2:A(2,A)=Y+35:MOV EX+25,Y:PRINTCHR$224;:NEXT:A=A+8:NEXT 140FORSN=1TO12:PROCSNAKES:NEXT:FORHEAD =1TO4:READHX,HY:MOVEHX,HY:PRINTCHR$226:N EXT 150MOVE761,840:PRINTCHR$227:MOVE211,54 0:PRINTCHR$227:MOVE651,313:PRINTCHR$228: MOVE321,713:PRINTCHR$228:FORTA=1TO4:READ TX,TY:MOVETX,TY:PRINTCHR$229:NEXT:FORLA= 1TO7:PROCLADDERS:NEXT:GCOL0,1:PROCGAME 160IFPV=813 Z$=A$:H%=H%+1ELSEZ$=B$:J%= J%+1 170VDU19,0,8;0;19,2,12;0;:GCOL0,2:MOVE 200,450:MOVE200,750:PLOT85,830,750:MOVE8 30,450:PLOT85,200,450:GCOL0,15:COLOUR15: VDU4:PRINTTAB(5,10);"Winner";TAB(7,12);" Is";TAB(8-(LEN(Z$))/2,14);Z$:VDU4 180RESTORE900:FORM%=1TO62:READP%,L%,C% 190SOUND1,-15,P%,L%*3:FORT%=0TOL%*1000 :NEXT:NEXT:*FX15,7 200FORZ=0TO100:NEXT:MIN=(TIMEDIV6000)M OD60:SEC=(TIMEDIV100)MOD60 210VDU20,4:CLS:COLOUR6:PRINTTAB(2,2);" Duration Of Play:";TAB(3,4);MIN;" Mins ";SEC;" Secs" 220COLOUR2:PRINTTAB(3,7);"Would You Li ke"'TAB(4,9);"Another Game";TAB(9,11);"? ":X$=GET$ 230IFX$<>"Y"THEN250 240PRINTTAB(4,25);"Same Players?":X$=G ET$:IFX$="Y"PROCSK:Z$=A$:Y$=B$:GOTO20ELS ECLEAR:H%=0:J%=0:RUN 250IFX$<>"N"COLOUR12:PRINTTAB(3,18);"A nswer Properly";TAB(7,15);"Please":A=INK EY(200):CLS:GOTO220ELSEMODE7:END 260DATA415,215,424,200,439,258,452,246 ,452,246,452,258,312,330,304,313,848,208 ,864,196,896,347,927,335,927,335,899,317 ,848,515,868,526,653,296,666,312,174,383 ,185,405,185,405,204,402,234,518,209,533 270DATA519,410,532,396,581,457,562,467 ,583,454,559,454,478,678,504,682,504,667 ,484,680,765,828,782,813,748,512,760,500 ,818,670,795,670,818,670,804,658,746,712 ,754,724,320,700,336,712,326,824,311,815 280DATA261,345,811,540,701,740,261,840 ,371,213,811,213,481,413,701,513,599,189 ,639,175,801,319,775,342,167,292,194,270 ,464,524,441,548,611,401,638,384,688,526 ,667,544,883,472,916,495,861,740,829,716 290DATA166,597,197,579,483,822,441,841 ,551,581,579,598,526,750,495,720,226,773 ,255,801,198,842,174,824,23,6,34,2,39,14 ,51,30,63,21,58,43,4,18,9,37,20,35,32,50 ,36,53,40,60,55,57 300DEFPROCdraw:MOVEX,Y:MOVEX,Y+100:PLO T85,X+110,Y+100:MOVEX+110,Y:PLOT85,X,Y:E NDPROC 310DEFPROCSNAKES:GCOL0,1:READX,Y,X1,Y1 ,X2,Y2,X3,Y3:MOVEX,Y:MOVEX1,Y1:PLOT85,X2 ,Y2:MOVEX3,Y3:PLOT85,X,Y:ENDPROC 320DEFPROCLADDERS:GCOL0,3:READX,Y,X1,Y 1,X2,Y2,X3,Y3:MOVEX,Y:DRAWX3,Y3:MOVEX1,Y 1:DRAWX2,Y2:LE=(SQR(((X3-X)^2)+((Y3-Y)^2 )))/40:LEX=(X3-X)/LE:LEY=(Y3-Y)/LE:LEX1= (X2-X1)/LE:LEY1=(Y2-Y1)/LE 330N=X:M=Y:N1=X1:M1=Y1:FORJ=1TOLE:N=N+ LEX:M=M+LEY:N1=N1+LEX1:M1=M1+LEY1:MOVEN, M:DRAWN1,M1:NEXT:ENDPROC 340DEFPROCGAME:FORA=1TO13:READSNH,SNT: A(3,SNH)=1:A(4,SNH)=SNT:NEXT:GCOL3,1:MOV E0,80:PRINT" PLEASE WAIT":COLOUR5:VDU4 :PRINTTAB(1,2);A$;" Starts":VDU5:GCOL0,6 350MOVE1075,813:MOVE1175,813:PLOT85,11 75,913:MOVE1075,913:PLOT85,1075,813:MOVE 1070,800:PRINTLEFT$(A$,2),TAB(18,12);H%: GCOL0,2:MOVE1075,113:MOVE1175,113:PLOT85 ,1175,213:MOVE1075,213:PLOT85,1075,113 360MOVE1070,255:PRINTLEFT$(B$,2),TAB(1 8,18);J%:COLOUR4:VDU4:X$="G A M E S W O N":FORZ%=1TOLEN(X$):PRINTTAB(19,7+Z%);M ID$(X$,Z%,1):NEXT:VDU5:GCOL3,3:MOVEA(1,1 ),A(2,1):PRINTCHR$231:GCOL3,1:MOVEA(1,1) +46,A(2,1):PRINTCHR$231:POS1=1:POS2=1 370MOVE16,512:PRINT" " 380IFPOS1<>1GCOL0,3:COLOUR1:PROCL(29): PROCL(2):VDU4:PRINTTAB(2,2);"TURN:";A$:V DU5 390PV=813:GCOL3,3:*FX15,1 400PROCL(29):COLOUR1:VDU4:PRINTTAB(1,2 9);"Key D To Throw Dice":VDU5:GCOL3,2 410D$=GET$:IFD$<>"D"THEN410 420IFRN<>0PROCSUB(RN) 430RN=RND(6):PROCDICE(RN):PROCL(29):CO LOUR1:GCOL0,3:VDU4:PRINTTAB(1,29);"Ready To Move?":VDU5:GCOL3,3:*FX15,1 440M$=GET$:IFM$<>"Y"THEN440 450FORJM1=POS1TOPOS1+RN:IFJM1>64NEXT:E NDPROC 460IFTR=1ORJM1=POS1ORJM1=1MOVEA(1,JM1) ,A(2,JM1):PRINTCHR$231 470TR=0 480IFJM1<>1MOVEA(1,JM1),A(2,JM1):PRINT CHR$231 490FORZ=0TO999:NEXT 500IFJM1<>1ANDJM1<>POS1+RNMOVEA(1,JM1) ,A(2,JM1):PRINTCHR$231 510IFJM1<>POS1+RNSOUND2,1,A(1,JM1)/4,1 :SOUND3,1,A(2,JM1),1 520NEXT:POS1=POS1+RN:IFA(3,POS1)=1PROC SNORL(0,POS1) 530IFRN=6THEN380 540PV=113:PROCL(29):PROCL(2):COLOUR2:V DU4:PRINTTAB(2,2);"TURN:";B$:VDU5:*FX15, 1 550PROCL(29):COLOUR2:VDU4:PRINTTAB(1,2 9);"Key D To Throw Dice":VDU5:GCOL3,7 560D$=GET$:IFD$<>"D"THEN560 570IFRN2<>0PROCSUB(RN2) 580RN2=RND(6):GCOL3,7:PROCDICE(RN2):GC OL0,2:PROCL(29):GCOL0,2:COLOUR2:VDU4:PRI NTTAB(1,29);"Ready To Move?":VDU5:GCOL3, 1:*FX15,1 590M$=GET$:IFM$<>"Y"THEN590 600FORJM2=POS2TOPOS2+RN2:IFJM2>64NEXT: ENDPROC 610IFTR1=1ORJM2=POS2ORJM2=1MOVEA(1,JM2 )+46,A(2,JM2):PRINTCHR$231 620TR1=0:IFJM2<>1MOVEA(1,JM2)+46,A(2,J M2):PRINTCHR$231 630FORZ=0TO999:NEXT 640IFJM2<>1ANDJM2<>POS2+RN2MOVEA(1,JM2 )+46,A(2,JM2):PRINTCHR$231:SOUND2,1,A(1, JM2)/4,1:SOUND1,1,A(2,JM2),1 650IFJM2<>POS2+RN2SOUND2,1,A(1,JM2)/4, 1:SOUND3,1,A(2,JM2),1 660NEXT:POS2=POS2+RN2:IFA(3,POS2)=1PRO CSNORL(46,POS2) 670IFRN2=6THEN540 680GOTO380 690MOVE1096,77+PV:PRINTCHR$232+U$+CHR$ 233:RETURN 700MOVE1097,78+PV:PRINTCHR$234+U$+CHR$ 235:RETURN 710MOVE1097,80+PV:PRINTCHR$236+U$+CHR$ 237:RETURN 720MOVE1098,80+PV:PRINTCHR$238+U$+CHR$ 239:RETURN 730MOVE1098,80+PV:PRINTCHR$240+U$+CHR$ 241:RETURN 740MOVE1098,80+PV:PRINTCHR$242+U$+CHR$ 243:RETURN 750DEFPROCDICE(DI):SOUND1,0,60,1:INC=1 :FORDTH=1TO1000:IFDTH<>1PROCSUB(RNTH) 760INC=INC*1.5:DTH=DTH+INC:RNTH=RND(6) :PROCSUB(RNTH):*FX15,5 770SOUND0,-15,3,2:FORZ%=1TOINC*10:NEXT :NEXT 780PROCSUB(RNTH):*FX15,5 790SOUND0,-15,3,2:PROCSUB(DI):ENDPROC 800DEFPROCSNORL(DIF,APOS):AR=A(4,APOS) :AR1=APOS:IFA(2,AR1)<A(2,AR)DIR=4ELSEDIR =-4 810PROCQ:IF(G%=0ANDDIR=4)OR(G%=0ANDDIR =-4)ENDPROC 820MOVEA(1,APOS)+DIF,A(2,APOS) 830FORD%=A(2,AR1)/4TOA(2,AR)/4STEPDIR: SOUND1,-15,D%,1:SOUND3,-15,D%+32,1:NEXT 840PRINTCHR$231:MOVEA(1,AR)+DIF,A(2,AR ):PRINTCHR$231:IFPV=813 POS1=AR:TR=1ELSE POS2=AR:TR1=1 850ENDPROC 860DEFPROCL(BAT):VDU4:PRINTTAB(0,BAT); SPC(20);:VDU5:ENDPROC 870DEFPROCSUB(DT):ONDTGOSUB690,700,710 ,720,730,740:ENDPROC 880DEFPROCSO2:*FX15,7 890SOUND2,-12,C%,100:ENDPROC 900DATA129,1,0,117,3,53,117,1,0,117,1, 0,113,1,0,117,1,0,121,3,0,117,2,0,117,1, 0,109,3,33,109,1,0,109,1,0,101,1,0,109,1 ,0,117,3,53,101,2,0,109,1,0,117,3,0,117, 1,0,117,1,0,109,1,0,117,1,0,121,2,25,129 ,1,0,137,2,0,137,1,0,129,2,53 910DATA121,1,0,117,2,33,109,1,0,101,4, 53 911DATA129,1,0,117,3,53,117,1,0,117,1, 0,113,1,0,117,1,0,121,3,0,117,2,0,117,1, 0,109,3,33,109,1,0,109,1,0,101,1,0,109,1 ,0,117,3,53,101,2,0,109,1,0,117,3,0,117, 1,0,117,1,0,109,1,0,117,1,0,121,2,25,129 ,1,0,137,2,0,137,1,0,129,2,53 912DATA121,1,0,117,2,33,109,1,0,101,4, 53 920DEFPROCQ:VDU4:PROCL(2):SOUND3,2,100 ,1:FORZ=0TO50:NEXT:A%=RND(4):PROCrem:END PROC 1020DEFPROCANS:ENDPROC 1050DEFPROCrem:PROCL(29):G%=1 1060FORZ=0TO3000:NEXT:VDU5:ENDPROC 1070DEFPROCSK:ENDPROC