home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.whtech.com
/
ftp.whtech.com.tar
/
ftp.whtech.com
/
club100
/
gam
/
crmass.200
< prev
next >
Wrap
Text File
|
2006-10-19
|
3KB
|
76 lines
0 'CRMASS.BA Gary Sullivan CLUB 100 Library - 415/939-1246 BBS, 937-5039 NEWSLETTER, 932-8856 VOICE
1 CLS:CLEAR100:DEFINTA-Z:POKE63277,PEEK(61983)
2 DIMP(5,5),C(5,5),M(5,5):X=3:Y=3:T=99
3 GOSUB100
4 PRINT@65,"CRITICAL MASS":
5 PRINT@105,"MASS: 5":PRINT@185,"COMPUTER:":PRINT@225,"PLAYER:":PRINT@305,"TURN: 99"
6 LINE(15,5)-(135,123),1,B:PRINT@331,CHR$(229)
7 FORI=1TO4:LINE(15,I*24+3)-(135,I*24+3):LINE(I*24+15,5)-(I*24+15,123):NEXT
8 FORI=1TO5:FORJ=1TO5:READM(I,J):NEXT:NEXT
9 DATA 2,3,3,3,2,3,4,4,4,3,3,4,5,4,3,3,4,4,4,3,2,3,3,3,2
10 I$=INKEY$:IFI$=""THEN10
11 IFASC(I$)=27THENMENU
12 IFASC(I$)=13THENP(X,Y)=P(X,Y)+1:POKE61191,X*4+1:POKE61190,Y*3:PRINTSTR$(P(X,Y)):GOSUB30:GOTO20
13 POKE61191,X*4:POKE61190,Y*3:PRINT" "
14 IFASC(I$)=28THENX=X+1:IFX>5THENX=1
15 IFASC(I$)=29THENX=X-1:IFX<1THENX=5
16 IFASC(I$)=30THENY=Y-1:IFY<1THENY=5
17 IFASC(I$)=31THENY=Y+1:IFY>5THENY=1
18 PRINT@110,M(X,Y):POKE61191,X*4:POKE61190,Y*3:PRINTCHR$(229)
19 GOTO10
20 A=RND(1)*5+1:B=RND(1)*5+1:C(A,B)=C(A,B)+1
21 POKE61191,A*4:POKE61190,B*3-1:PRINTCHR$(27)"p";C(A,B);CHR$(27)"q"
22 GOSUB30
23 T=T-1:P=0:C=0:PRINT@310,T
24 FORI=1TO5:FORJ=1TO5
25 IFP(I,J)>C(I,J)THENP=P+1
26 IFC(I,J)>P(I,J)THENC=C+1
27 NEXT:NEXT
28 PRINT@194,C:PRINT@234,P
29 PRINT@505,SPACE$(15):GOTO10
30 PRINT@505,"Thinking...":
31 FORI=1TO5:FORJ=1TO5
32 IFP(I,J)+C(I,J)<=M(I,J)THEN59ELSEBEEP
33 IFP(I,J)<C(I,J)THENV=P(I,J)ELSEV=C(I,J)
34 FORK=1TOV
35 P(I,J)=P(I,J)-1:IFP(I,J)<0THENP(I,J)=0:GOTO50
36 POKE61191,I*4+1:POKE61190,J*3:PRINTSTR$(P(I,J))
37 A=RND(1)*4-2:B=RND(1)*4-2
38 IFI+A<1ORI+A>5ORJ+B<1ORJ+B>5THEN58
39 P(I+A,J+B)=P(I+A,J+B)+1
40 POKE61191,(I+A)*4+1:POKE61190,(J+B)*3
41 PRINTSTR$(P(I+A,J+B))
50 C(I,J)=C(I,J)-1:IFC(I,J)<0THENC(I,J)=0:GOTO58
51 POKE61191,I*4:POKE61190,J*3-1
52 PRINTCHR$(27)"p";C(I,J);CHR$(27)"q"
53 A=RND(1)*4-2:B=RND(1)*4-2
54 IFI+A<1ORI+A>5ORJ+B<1ORJ+B>5THEN58
55 C(I+A,J+B)=C(I+A,J+B)+1
56 POKE61191,(I+A)*4:POKE61190,(J+B)*3-1
57 PRINTCHR$(27)"p";C(I+A,J+B);CHR$(27)"q"
58 NEXT
59 NEXT:NEXT:IFT>1THENRETURN
60 PRINT@305,"TIMES UP."
61 IFP>CTHENI$="You win!"ELSEIFP<CTHENI$="You lose!"ELSEIFP=CTHENI$="Tie!"
62 PRINT@345,I$
63 PRINT@505,"Again (Y/N)?"
64 I$=INKEY$:IFI$=""THEN64
65 IFINSTR("Yy",I$)THEN1ELSEMENU
100 PRINT@90,"CRITICAL MASS":PRINT@126,"Fred Brown [73267,2450]"
105 PRINT@203,"Do you want instructions? (Y/N)"
106 I$=INKEY$:IFI$=""THEN106
107 IFINSTR("Yy",I$)THEN108ELSECLS:RETURN
108 CLS:PRINT:PRINT"The object of Critical Mass is to"
109 PRINT"capture squares. A square is captured"
110 PRINT"if you have a greater number than the
111 PRINT"computer in that square."
112 PRINT"If the total value of the square"
113 PRINT"exceeds the mass for that square,"
114 PRINT"it will 'explode', sending excess"
115 PRINT"mass to adjacent squares."
116 PRINT"Move the cursor with the arrow keys."
117 PRINT"<ENTER> will place mass in that square."
118 PRINT"<ESC> will exit to MENU at any time."
119 PRINT"You have 99 turns. Good Luck!"
120 PRINT:PRINTTAB(8);"Press <ENTER> to begin.";:LINEINPUTI$:CLS:RETURN