REM Red v Green - Battle of the Bacteria REM by R.G.Weston MODE0 PRINTTAB(15)"Battle of the Bacteria - a test of Psychokinesis"''' PRINTTAB(0)"Define your grid size (x along, y down):"' PRINTTAB(5)"(Start small (eg 6 x 6) and work up)"' PRINTTAB(15)"You can press the Space Bar to restart at any time)"'' PRINTTAB(20)"Choose Red or Green and will it to win!"' INPUT''TAB(5)"Enter x (less than 20) :"XX INPUT'TAB(5)"Enter y (less than 30) :"YY MODE2 VDU23;8202;0;0;0; DIM pos(XX,YY) FOR X=0 TO XX-1 FOR Y=0 TO YY-1 C=RND(2) IF C=1 THEN pos(X,Y)=1:COLOUR2:I$="*" IF C=2 THEN pos(X,Y)=2:COLOUR1:I$="&" PRINTTAB(X,Y)I$ NEXT:NEXT REPEAT REM Slow down TIME=0:REPEAT UNTIL TIME>1 X=RND(XX)-1 :Y=RND(YY)-1 NX=X+2-RND(3) NY=Y+2-RND(3) NX=(XX-1+NX) MOD (XX-1) NY=(YY-1+NY) MOD (YY-1) pos(X,Y)=pos(NX,NY) IF pos(X,Y)=1 THEN COLOUR2:PRINTTAB(X,Y)"*" ELSE COLOUR1:PRINTTAB(X,Y)"&" UNTIL INKEY$(0)=" " RUN