0 'Club 100 Library - 415/939-1246 BBS 937-5039 NEWSLETTER, 932-8856 VOICE 1 'LIFE' 1/11/85 2345 BYTES 2 'FROM THE WAITE GROUP - GAMES P.75 3 'Introduction, etc. by STAN KENDALL 5 GOTO10 8 INPUT" ";U:CLS:BEEP:RETURN 10 CLS:DEFINTA-Z:LINE(46,4)-(194,63),1,BF 15 PRINT@93,"'LIFE' ":LINE(50,12)-(190,27),0,B 20 A=5:B=10:SOUND6269,A:SOUND4968,A:SOUND4184,A:SOUND3516,B:SOUND4184,A:SOUND3516,50 41 PRINT@168,"'PLAY' PRESS P 'QUIT' Q" 42 PRINT@251,"'THEORY' PRESS T" 43 K$=INKEY$ 44 IFK$="P"ORK$="p"THEN48 45 IFK$="Q"ORK$="q"THENMENU 46 IFK$="T"ORK$="k"THEN600 47 GOTO43 48 CLEAR:BEEP:CLS:PRINT@42,; 50 INPUT"Screen Size - Limits 58 & 14";M,N:DIMA(1,M+1,N+1) 55 PRINT:PRINT" Move Cursor with Cursor Keys." 60 PRINT" Type 1 for cell, 0 to erase cell." 75 PRINT" Press L to start design - R to stop" 80 PRINT:INPUT" to continue...";U 90 G=1:I=1:J=1:K=0:L=1:X=1:Y=1:A$="1" 100 CLS:LINE(0,0)-(4*M+7,4*N+7),1,BF 110 LINE(4,4)-(4*M+3,4*N+3),0,BF 130 'Enter First Generation. 150 LINE(4*I,4*J)-(4*I+3,4*J+3),VAL(A$),BF 160 A$=INKEY$:IFA$=""THEN160 170 IFA$="l"ORA$="L"THEN320 180 IFA$="1"ORA$="0"THENA(0,I,J)=VAL(A$):GOTO150 190 IF ASC(A$)=28THEN I=I+1:IFI>MTHENI=M 200 IF ASC(A$)=29THEN I=I-1:IFI<1THENI=1 210 IF ASC(A$)=30THEN J=J-1:IFJ<1THENJ=1 220 IF ASC(A$)=31THEN J=J+1:IFJ>NTHENJ=N 230 LINE(4*X,4*Y)-(4*X+3,4*Y+3),A(0,X,Y),BF 240 X=I:Y=J:A$="1":GOTO150 250 FORI=1TOM 260 FORJ=1TON 270 LINE(4*I,4*J)-(4*I+3,4*J+3),A(K,I,J),BF 280 NEXTJ:NEXTI 300 'Calculate and Print Next Generation. 320 SOUND8000,1:PRINT@280,"Generation ";G; 330 FORI=1TOM 340 FORJ=1TON 345 IFINKEY$="R"ORINKEY$="r"THEN1 350 S=A(K,I-1,J-1)+A(K,I,J-1)+A(K,I+1,J-1)+A(K,I-1,J)+A(K,I+1,J)+A(K,I-1,J+1)+A(K,I,J+1)+A(K,I+1,J+1) 360 IF A(K,I,J)<>0THEN390 370 IFS<>3THEN A(L,I,J)=0ELSE A(L,I,J)=1:LINE(4*I,4*J)-(4*I+3,4*J+3),1,BF 380 GOTO400 390 IF S=2ORS=3THEN A(L,I,J)=1ELSE A(L,I,J)=0:LINE(4*I,4*J)-(4*I+3,4*J+3),0,BF 400 NEXTJ:NEXTI 410 K=1-K:L=1-L:G=G+1 420 GOTO320:'........... 600 BEEP:CLS:PRINT@41,; 610 PRINT"'LIFE's changing patterns resemble the growth of colonies of living organisms such as microbes, where individual mem- bers are born,live,and die. The player" 620 PRINT" creates the first generation with the cursor keys & the computer then prod- uces later generations. ";:GOSUB8 630 PRINT@42,"Each space on the screen can contain a 'cell'. A cell depends on how many neighbors it has. <1> A cell will be" 640 PRINT" 'born' if it is surrounded by exactly three living cells. <2> A cell will continue to live if it is surrounded by 2 or 3 living cells.";:GOSUB8 650 PRINT@42,"<3> A cell will die if surrounded by <2 or >3 living cells, as though it dies from loneliness or overcrowding." 660 PRINT:PRINT"....TRY DIFFERENT STARTING PATTERNS....":PRINT:GOSUB8:GOTO1