11.07.2015 Views

Untitled - TRS-80 Color Computer Archive

Untitled - TRS-80 Color Computer Archive

Untitled - TRS-80 Color Computer Archive

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

moves :*GOSUB cline:PRINT "Move Limit";:INPUT ml-*ml=INT(ml):IF ml=sc{f) THEN ahead*ia=f:pa=sc{f)*ahead:*IF pb>=sc(f+6) OR a(i(f+6))=0 THEN skip2*ib=i{f+6) ;pb=sc(f+6)*skip2:*NEXT f*IF ia=0 AND ib=0 THEN skip3*i=ia:IF pb>pa THEN i=ib*GOTOprintit*skip3:*p=0:FOR f=7 TO 12:p=p+a{f):NEXTf*IF p0 THEN random*FOR f=l TO 5*IF a(f)0 AND a(f)24 THEN award*GOTO player**nocounters:*FOR tm=l TO 600:NEXT*COLOR 4:GOSUB cline:PRINT "No COuntersl11 ";*gameend:*IF pt=0 THEN PRINT "Game over."*FOR tm=l TO 1500:NEXT*IF pt=0 THEN winner**awardi*COLOR 4:GOSUB cline:PRINT "Gameover. ";*COLOR 6:PRINT "Award counters."*FOR f=l TO 6-*p?="C":sc=a(f):t=f:b(t)=0:GOSUBplacepieces *p$="P":sp=a{f+6):t=f+6:b(t)=0:GOSUB placepieces*NEXT**winner:*GOSUBcline*COLOR 3:IF pl=cp THEN PRINT "A draw. ";:GOTO another*IF pl>cp THEN COLOR 2iPRINT "Player wins. ";:GOTO another*COLOR 4sPRINT "<strong>Computer</strong> wins. ";another:*COLOR 7:PRINT "Another game (Y/N)? ";*another2:*GOSUB getchar:IF b$o"Y" AND b$"N" THEN another2*PRINT b$:IF b$="Y" THEN restart*WINDOW CLOSE 3*SCREEN CLOSE 1*WINDOW l,"Wari",,31,-1*CLEAR ,25000*END **quit:*FOR tm=l TO 200:NEXT*COLOR 4:GOSUB cline*PRINT "Quit game. Are you sure (Y/N)? ";*again:*GOSUB getchar:IF b$o"Y" AND b$ "N" THEN again*IF b$o"Y" THEN entry*GOSUB cline:pt=0:GOTO gameend**placepieces:*COLOR 7*IF t6 THEN tb=5*(t-6)+l*place:* /LOCATE 13-2*(t>6),tb:PRINT b(t)*FOR tm=l TO 1000:NEXT tm*IF b(t)0 THEN RETURN*IF p5="P" THEN GOSUB playerscore:RETURN*IF p$="C" THEN GOSUB computerscore:RETURN**movecounters:*t=i:sl=0:s2=0*FOR f=l TO 12:b(f)=a(f):NEXT*b(t)=0:lF ds THEN GOSUB placepieces*FOR f=l TO a(t)*t=t+l*IF t>12 THEN t=l*b(t)=b(t)+l:IF ds THEN GOSUB placepieces*NEXT f:t0=t**captures:*IF b(t0)3 THEN RETURN*IF pS="P" AND t0=7 THEN total*RETURN**total:*lO=ltIF p5="C" THEN ls=7*FOR f=t0 TO Is STEP -1*IF b(f)3 THEN RETURN*IF pS="P" THEN sp=b{f):s2=s2+sp:GOTO total2*IF p?="C" THEN sc=b(f):sl=sl+sc*total2:*b{f)=0:IF ds THEN t=f:GOSUB placepieces*NEXT f:RETURN**getchar:*b$=UCASE$(INKEYS):IF b$"" THENgetchar*getchar2:*bS=UCASE$(INKEYS):IF b$="" THENgetchar2 ELSE RETURN**playerscore:*IF sp=0 THEN RETURN*FOR h=pl+l TO pl+sp*COLOR 4:LOCATE 21,19:PRINT h*SOUND 440,2,255,0:FOR tm=l TO 500:NEXT*NEXT h:pl=pl+sp:RETURN**computerscore:*IF sc=0 THEN RETURN*FOR h=cp+l TO cp+SC*COLOR 4:LOCATE 9,19:PRINT h*SOUND 220,2,255,0:FOR tm=l TO 500:NEXT*NEXT h:cp=cp+sc:RETURN*■*dash:*COLOR 1:FOR j=l TO 2:FOR i=l TO7:PRINT " "CHR$(124)r*NEXT:PRINT:NEXT:RETURN*4cline:*LOCATE 23,1:PRINT ds$:LOCATE 23,1:RETURN*Program 6: Wari For Atari400, <strong>80</strong>0, XL, And XEVersion by Patrick Parrish,Programming SupervisorIH 10 OPEN #1 ,4, 0, "K: ": DIM A(12),B(12),SC,P»( 1) ,SP*(37)HI 20 FOR 1-0 TO iliREAD A:POKE 1664+1,AiNEXT IIK 30 DATA 104, 165, 203,5, 20470 COMPUTEI February 19B7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!