REM Start of Strategy Program GameStart: REM variables start DIM gamepool[16,8,4] DIM buff_gamepool[16,8,4] DIM searchzone[3,3] p=1 x=0 y=0 tester=0 devCon=0 REM variables end REM Menu start !############################ Menu: GR.OPEN 255,255,255,255,0 GR.SCREEN width, height scale_width = width /800 scale_height = height /480 GR.SCALE scale_width, scale_height GR.TEXT.ALIGN 2 GR.TEXT.SIZE 70 GR.COLOR 255,30,200,150,1 GR.RECT StartButton,60,100,310,200 GR.COLOR 255,255,255,255,1 GR.TEXT.DRAW StartText,185,180,"PLAY" GR.COLOR 255,30,200,150,1 GR.RECT AboutButton,370,100,740,200 GR.COLOR 255,255,255,255,1 GR.TEXT.DRAW StartText,555,180,"ABOUT" GR.COLOR 255,30,200,150,1 GR.RECT ExitButton, 180,300,620,400 GR.COLOR 255,255,255,255,1 GR.TEXT.DRAW StartText,400,380,"EXIT" GR.RENDER WHILE playstart<>1 GR.BOUNDED.TOUCH TPlay,60*scale_width,100*scale_height,310*scale_width,200* scale_height GR.BOUNDED.TOUCH TAbout,370*scale_width,100*scale_height,740*scale_width,200*scale_height GR.BOUNDED.TOUCH TExit,180*scale_width,300*scale_height,620*scale_width,400*scale_height IF TPlay THEN gosub play_flag IF TAbout THEN gosub about_flag IF TExit THEN gosub exit_flag REPEAT GOTO first_run_flag REM Menu end !###################### play_flag: playstart=1 GR.TEXT.SIZE 70 FOR i=1 TO 20 GR.CLS GR.TEXT.SIZE 70 GR.COLOR 255,30,200,150,1 GR.RECT StartButton,60,100,310,200 GR.COLOR 255,255,255,255,1 GR.TEXT.DRAW StartText,185,180,"PLAY" GR.COLOR 255,30,200,150,1 GR.RECT AboutButton,370,100,740,200 GR.COLOR 255,255,255,255,1 GR.TEXT.DRAW StartText,555,180,"ABOUT" GR.COLOR 255,30,200,150,1 GR.RECT ExitButton, 180,300,620,400 GR.COLOR 255,255,255,255,1 GR.TEXT.DRAW StartText,400,380,"EXIT" GR.COLOR 255-i*12.75,30+i*11.25,200+(i*2.75),150+i*5.25,1 GR.RECT StartButton,60,100,310,200 GR.COLOR 255,255,255,255,1 GR.TEXT.DRAW StartText,185,180,"PLAY" GR.COLOR 0+i*12.75,255,255,255,1 GR.RECT obj,0,0,800,480 GR.RENDER PAUSE 1 NEXT i GR.CLS RETURN !########################### about_flag: FOR i=1 TO 15 GR.CLS GR.TEXT.SIZE 70 GR.COLOR 255,30,200,150,1 GR.RECT StartButton,60,100,310,200 GR.COLOR 255,255,255,255,1 GR.TEXT.DRAW StartText,185,180,"PLAY" GR.COLOR 255,30,200,150,1 GR.RECT AboutButton,370,100,740,200 GR.COLOR 255,255,255,255,1 GR.TEXT.DRAW StartText,555,180,"ABOUT" GR.COLOR 255,30,200,150,1 GR.RECT ExitButton, 180,300,620,400 GR.COLOR 255,255,255,255,1 GR.TEXT.DRAW StartText,400,380,"EXIT" GR.COLOR 255,255-i*17,255-i*17,255-i*17,1 GR.TEXT.SIZE 25 GR.TEXT.DRAW about_me, 400,470,"Ver 0.1.1 by ggSofts.Happy New Year,may the forse be with you." GR.RENDER NEXT i tester=tester+1 RETURN !########################### EXIT_flag: GR.TEXT.SIZE 70 FOR i=1 TO 15 GR.CLS GR.TEXT.SIZE 70 GR.COLOR 255,30,200,150,1 GR.RECT StartButton,60,100,310,200 GR.COLOR 255,255,255,255,1 GR.TEXT.DRAW StartText,185,180,"PLAY" GR.COLOR 255,30,200,150,1 GR.RECT AboutButton,370,100,740,200 GR.COLOR 255,255,255,255,1 GR.TEXT.DRAW StartText,555,180,"ABOUT" GR.COLOR 255,30,200,150,1 GR.RECT ExitButton, 180,300,620,400 GR.COLOR 255,255,255,255,1 GR.TEXT.DRAW StartText,400,380,"EXIT" GR.COLOR 255-i*10,30+i*12,200+(i*2.5),150+i*4,1 GR.RECT ExitButton, 180,300,620,400 GR.COLOR 255,255,255,255,1 GR.TEXT.DRAW StartText,400,380,"EXIT" GR.COLOR 0+i*12.5,255,255,255,1 GR.RECT obj,0,0,800,480 GR.RENDER PAUSE 1 NEXT i END !############################ REM first_run first_run_flag: touched=false p1=5 p2=5 p=1 FOR i=1 TO 16 FOR j=1 TO 8 FOR k=1 TO 4 gamepool[i,j,k]=0 NEXT k NEXT j NEXT i gamepool[1,1,1]=1 gamepool[1,1,2]=5 gamepool[1,1,3]=300 gamepool[1,1,4]=25 gamepool[16,8,1]=2 gamepool[16,8,2]=6 gamepool[16,8,3]=300 gamepool[16,8,4]=25 GOSUB draw GOTO input_flag REM end first_run !######################### REM start draw and input. draw: GR.CLS GR.COLOR 255,255,255,255,1 GR.RECT obj,0,0,800,480 FOR i=1 TO 16 FOR j=1 TO 8 IF gamepool[i,j,2]=0 THEN gosub draw_1 IF gamepool[i,j,2]=2 THEN gosub draw_2 IF gamepool[i,j,2]=3 THEN gosub draw_3 IF gamepool[i,j,2]=4 THEN gosub draw_4 IF gamepool[i,j,2]=5 THEN gosub draw_5 IF gamepool[i,j,2]=6 THEN gosub draw_6 IF gamepool[i,j,2]=7 THEN gosub draw_7 IF gamepool[i,j,2]=8 THEN gosub draw_8 IF gamepool[i,j,2]=9 THEN gosub draw_9 IF gamepool[i,j,2]=10 THEN gosub draw_10 NEXT j NEXT i GOSUB gui_flag GR.RENDER RETURN GOTO input_flag draw_1: GR.COLOR 255,254,253,255,1 GR.RECT obj,x+(i-1)*8+(i-1)*48+8,y+(j-1)*8+(j-1)*48+8,x+(i-1)*8+(i-1)*48+48+8,y+(j-1)*8+(j-1)*48+48+8 RETURN draw_2: GR.COLOR 255,0,0,0,1 GR.RECT obj,x+(i-1)*8+(i-1)*48+8,y+(j-1)*8+(j-1)*48+8,x+(i-1)*8+(i-1)*48+48+8,y+(j-1)*8+(j-1)*48+48+8 RETURN draw_3: GR.COLOR 255,30,200,150,1 GR.RECT obj,x+(i-1)*8+(i-1)*48+8,y+(j-1)*8+(j-1)*48+8,x+(i-1)*8+(i-1)*48+48+8,y+(j-1)*8+(j-1)*48+48+8 RETURN draw_4: GR.COLOR 255,255,43,43,1 GR.RECT obj,x+(i-1)*8+(i-1)*48+8,y+(j-1)*8+(j-1)*48+8,x+(i-1)*8+(i-1)*48+48+8,y+(j-1)*8+(j-1)*48+48+8 RETURN draw_5: GR.COLOR 255,10,90,36,1 GR.RECT obj,x+(i-1)*8+(i-1)*48+8,y+(j-1)*8+(j-1)*48+8,x+(i-1)*8+(i-1)*48+48+8,y+(j-1)*8+(j-1)*48+48+8 RETURN draw_6: GR.COLOR 255,129,17,76,1 GR.RECT obj,x+(i-1)*8+(i-1)*48+8,y+(j-1)*8+(j-1)*48+8,x+(i-1)*8+(i-1)*48+48+8,y+(j-1)*8+(j-1)*48+48+8 RETURN draw_7: GR.COLOR 255,241,122,14,1 GR.RECT obj,x+(i-1)*8+(i-1)*48+8,y+(j-1)*8+(j-1)*48+8,x+(i-1)*8+(i-1)*48+48+8,y+(j-1)*8+(j-1)*48+48+8 RETURN draw_8: GR.COLOR 255,34,123,121,1 GR.RECT obj,x+(i-1)*8+(i-1)*48+8,y+(j-1)*8+(j-1)*48+8,x+(i-1)*8+(i-1)*48+48+8,y+(j-1)*8+(j-1)*48+48+8 RETURN draw_9: GR.COLOR 255,5,175,5,1 GR.RECT obj,x+(i-1)*8+(i-1)*48+8,y+(j-1)*8+(j-1)*48+8,x+(i-1)*8+(i-1)*48+48+8,y+(j-1)*8+(j-1)*48+48+8 RETURN draw_10: GR.COLOR 255,90,90,90,1 GR.RECT obj,x+(i-1)*8+(i-1)*48+8,y+(j-1)*8+(j-1)*48+8,x+(i-1)*8+(i-1)*48+48+8,y+(j-1)*8+(j-1)*48+48+8 RETURN gui_flag: GR.COLOR 255,0,0,0,1 GR.RECT obj,48,20,114,86 IF p=1 THEN gr.color 255,30,200,150,1 IF p=2 THEN gr.color 255,255,43,43,1 IF p=1 THEN gr.text.draw txt,730,420,STR$(p1) IF p=2 THEN gr.text.draw txt,730,420,STR$(p2) GR.CIRCLE obj,74,406,64 IF p=1 THEN gr.color 255,30,200,150,1 IF p=2 THEN gr.color 255,255,43,43,1 GR.RECT obj,162,20,228,86 GR.COLOR 255,241,122,14,1 GR.RECT obj,276,20,342,86 GR.COLOR 255,34,123,121,1 GR.RECT obj,390,20,456,86 GR.COLOR 255,5,175,5,1 GR.RECT obj,504,20,570,86 GR.COLOR 255,90,90,90,1 GR.RECT obj,618,20,684,86 IF chosen=0 THEN gr.color 255,255,255,255,1 IF chosen=1 THEN gr.color 255,0,0,0,1 IF chosen=2 THEN IF p=1 THEN gr.color 255,30,200,150,1 IF p=2 THEN gr.color 255,255,43,43,1 ENDIF IF chosen=3 THEN gr.color 255,241,122,14,1 IF chosen=4 THEN gr.color 255,34,123,121,1 IF chosen=5 THEN gr.color 255,5,175,5,1 IF chosen=6 THEN gr.color 255,90,90,90,1 GR.RECT obj,732,20,798,86 GR.RENDER RETURN !######################## INPUT_flag: DO GR.TOUCH touched, touchX, touchY touchX=touchX*scale_width touchY=touchY*scale_height GR.BOUNDED.TOUCH wall,20*scale_width,20*scale_height,86*scale_width,86*scale_height GR.BOUNDED.TOUCH solider,162*scale_width,20*scale_height,228*scale_width,86*scale_height GR.BOUNDED.TOUCH low,276*scale_width,20*scale_height,342*scale_width,86*scale_height GR.BOUNDED.TOUCH high,390*scale_width,20*scale_height,456*scale_width,86*scale_height GR.BOUNDED.TOUCH nextTurn, 10*scale_width , 342*scale_height, 138*scale_width, 470*scale_height GR.BOUNDED.TOUCH heal,504*scale_width,20*scale_height,570*scale_width,86*scale_height GR.BOUNDED.TOUCH bomb,618*scale_width,20*scale_height,684*scale_width,86*scale_height GR.BOUNDED.TOUCH go,732*scale_width,20*scale_height,798*scale_width,86*scale_height UNTIL touched IF wall THEN chosen=1 touched=false wall=false ENDIF IF solider THEN chosen=2 touched=false solider=false ENDIF IF low THEN chosen=3 touched=false low=false ENDIF IF high THEN chosen=4 touched=false high=false ENDIF IF heal THEN chosen=5 touched=false heal=false ENDIF IF bomb THEN chosen=6 touched=false bomb=false ENDIF IF go THEN chosen=0 touched=false go=false ENDIF IF nextTurn GOSUB logic_flag if p=1 then p1=p1+1 if p=2 then p2=p2+1 p=p+1 IF p>2 THEN p=1 touched=false ENDIF IF touched=false THEN GOSUB draw GOTO input_flag ENDIF IF chosen=0 THEN gosub move_flag IF chosen=1 THEN gosub c1 if chosen=2 then gosub c2 if chosen=3 then gosub c3 if chosen=4 then gosub c4 if chosen=5 then gosub c5 if chosen=6 then gosub c6 GOSUB gui_flag GOTO input_flag move_flag: IF touchX<80 THEN x=x+64 IF touchX>720 THEN x=x-64 IF touchX>80 THEN IF touchX<720 THEN IF touchY>height/2 THEN y=y-64 IF touchY16 THEN return IF touchY<1 THEN return IF touchY>8 THEN return IF gamepool[touchX,touchY,1]=1 THEN return IF gamepool[touchX,touchY,1]=2 THEN return if touchX-1>0 then if touchY+1<9 then if gamepool[touchX-1,touchY+1,1]=p then k=k+1 endif if gamepool[touchX-1,touchY,1]=p then k=k+1 if touchY-1>0 then if gamepool[touchX-1,touchY-1,1]=p then k=k+1 endif endif if touchX>0 then if touchY+1<9 then if gamepool[touchX,touchY+1,1]=p then k=k+1 endif if gamepool[touchX,touchY,1]=p then k=k+1 if touchY-1>0 then if gamepool[touchX,touchY-1,1]=p then k=k+1 endif endif if touchX+1<17 then if touchY+1<9 then if gamepool[touchX+1,touchY+1,1]=p then k=k+1 endif if gamepool[touchX+1,touchY,1]=p then k=k+1 if touchY-1>0 then if gamepool[touchX+1,touchY-1,1]=p then k=k+1 endif endif if p=1 then if p1-2>0 then return endif if p=2 then if p2-2>0 then return endif if p=1 then p1=p1-2 if p=2 then p2=p2-2 k=0 gamepool [touchX, touchY, 1]=p gamepool [touchX, touchY, 2]=2 gamepool [touchX, touchY, 3]=100 gamepool [touchX, touchY, 4]=0 gosub draw return c2: k=0 touchX=ROUND((touchX-x)/56) touchY=ROUND((touchY-y)/56) IF touchX<1 THEN return IF touchX>16 THEN return IF touchY<1 THEN return IF touchY>8 THEN return IF gamepool[touchX,touchY,1]=1 THEN return IF gamepool[touchX,touchY,1]=2 THEN return if touchX-1>0 then if touchY+1<9 then if gamepool[touchX-1,touchY+1,1]=p then k=k+1 endif if gamepool[touchX-1,touchY,1]=p then k=k+1 if touchY-1>0 then if gamepool[touchX-1,touchY-1,1]=p then k=k+1 endif endif if touchX>0 then if touchY+1<9 then if gamepool[touchX,touchY+1,1]=p then k=k+1 endif if gamepool[touchX,touchY,1]=p then k=k+1 if touchY-1>0 then if gamepool[touchX,touchY-1,1]=p then k=k+1 endif endif if touchX+1<17 then if touchY+1<9 then if gamepool[touchX+1,touchY+1,1]=p then k=k+1 endif if gamepool[touchX+1,touchY,1]=p then k=k+1 if touchY-1>0 then if gamepool[touchX+1,touchY-1,1]=p then k=k+1 endif endif if p=1 then if p1-1>0 then return endif if p=2 then if p2-1>0 then return endif if p=1 then p1=p1-1 if p=2 then p2=p2-1 k=0 gamepool [touchX, touchY, 1]=p if p=1 then gamepool [touchX, touchY, 2]=3 if p=2 then gamepool [touchX, touchY, 2]=4 gamepool [touchX, touchY, 3]=50 gamepool [touchX, touchY, 4]=10 gosub draw return c3: k=0 touchX=ROUND((touchX-x)/56) touchY=ROUND((touchY-y)/56) IF touchX<1 THEN return IF touchX>16 THEN return IF touchY<1 THEN return IF touchY>8 THEN return IF gamepool[touchX,touchY,1]=1 THEN return IF gamepool[touchX,touchY,1]=2 THEN return if touchX-1>0 then if touchY+1<9 then if gamepool[touchX-1,touchY+1,1]=p then k=k+1 endif if gamepool[touchX-1,touchY,1]=p then k=k+1 if touchY-1>0 then if gamepool[touchX-1,touchY-1,1]=p then k=k+1 endif endif if touchX>0 then if touchY+1<9 then if gamepool[touchX,touchY+1,1]=p then k=k+1 endif if gamepool[touchX,touchY,1]=p then k=k+1 if touchY-1>0 then if gamepool[touchX,touchY-1,1]=p then k=k+1 endif endif if touchX+1<17 then if touchY+1<9 then if gamepool[touchX+1,touchY+1,1]=p then k=k+1 endif if gamepool[touchX+1,touchY,1]=p then k=k+1 if touchY-1>0 then if gamepool[touchX+1,touchY-1,1]=p then k=k+1 endif endif if k<1 then return if p=1 then if p1-2>0 then return endif if p=2 then if p2-2>0 then return endif if p=1 then p1=p1-2 if p=2 then p2=p2-2 k=0 gamepool [touchX, touchY, 1]=p gamepool [touchX, touchY, 2]=7 gamepool [touchX, touchY, 3]=30 gamepool [touchX, touchY, 4]=2 gosub draw return c4: k=0 touchX=ROUND((touchX-x)/56) touchY=ROUND((touchY-y)/56) IF touchX<1 THEN return IF touchX>16 THEN return IF touchY<1 THEN return IF touchY>8 THEN return IF gamepool[touchX,touchY,1]=1 THEN return IF gamepool[touchX,touchY,1]=2 THEN return if touchX-1>0 then if touchY+1<9 then if gamepool[touchX-1,touchY+1,1]=p then k=k+1 endif if gamepool[touchX-1,touchY,1]=p then k=k+1 if touchY-1>0 then if gamepool[touchX-1,touchY-1,1]=p then k=k+1 endif endif if touchX>0 then if touchY+1<9 then if gamepool[touchX,touchY+1,1]=p then k=k+1 endif if gamepool[touchX,touchY,1]=p then k=k+1 if touchY-1>0 then if gamepool[touchX,touchY-1,1]=p then k=k+1 endif endif if touchX+1<17 then if touchY+1<9 then if gamepool[touchX+1,touchY+1,1]=p then k=k+1 endif if gamepool[touchX+1,touchY,1]=p then k=k+1 if touchY-1>0 then if gamepool[touchX+1,touchY-1,1]=p then k=k+1 endif endif if k<1 then return if p=1 then if p1-2>0 then return endif if p=2 then if p2-2>0 then return endif if p=1 then p1=p1-2 if p=2 then p2=p2-2 k=0 gamepool [touchX, touchY, 1]=p gamepool [touchX, touchY, 2]=8 gamepool [touchX, touchY, 3]=30 gamepool [touchX, touchY, 4]=2 gosub draw return c5: k=0 touchX=ROUND((touchX-x)/56) touchY=ROUND((touchY-y)/56) IF touchX<1 THEN return IF touchX>16 THEN return IF touchY<1 THEN return IF touchY>8 THEN return IF gamepool[touchX,touchY,1]=1 THEN return IF gamepool[touchX,touchY,1]=2 THEN return if touchX-1>0 then if touchY+1<9 then if gamepool[touchX-1,touchY+1,1]=p then k=k+1 endif if gamepool[touchX-1,touchY,1]=p then k=k+1 if touchY-1>0 then if gamepool[touchX-1,touchY-1,1]=p then k=k+1 endif endif if touchX>0 then if touchY+1<9 then if gamepool[touchX,touchY+1,1]=p then k=k+1 endif if gamepool[touchX,touchY,1]=p then k=k+1 if touchY-1>0 then if gamepool[touchX,touchY-1,1]=p then k=k+1 endif endif if touchX+1<17 then if touchY+1<9 then if gamepool[touchX+1,touchY+1,1]=p then k=k+1 endif if gamepool[touchX+1,touchY,1]=p then k=k+1 if touchY-1>0 then if gamepool[touchX+1,touchY-1,1]=p then k=k+1 endif endif if k<1 then return if p=1 then if p1-2>0 then return endif if p=2 then if p2-2>0 then return endif if p=1 then p1=p1-2 if p=2 then p2=p2-2 k=0 gamepool [touchX, touchY, 1]=p gamepool [touchX, touchY, 2]=9 gamepool [touchX, touchY, 3]=30 gamepool [touchX, touchY, 4]=5 gosub draw return c6: k=0 touchX=ROUND((touchX-x)/56) touchY=ROUND((touchY-y)/56) IF touchX<1 THEN return IF touchX>16 THEN return IF touchY<1 THEN return IF touchY>8 THEN return IF gamepool[touchX,touchY,1]=1 THEN return IF gamepool[touchX,touchY,1]=2 THEN return if touchX-1>0 then if touchY+1<9 then if gamepool[touchX-1,touchY+1,1]=p then k=k+1 endif if gamepool[touchX-1,touchY,1]=p then k=k+1 if touchY-1>0 then if gamepool[touchX-1,touchY-1,1]=p then k=k+1 endif endif if touchX>0 then if touchY+1<9 then if gamepool[touchX,touchY+1,1]=p then k=k+1 endif if gamepool[touchX,touchY,1]=p then k=k+1 if touchY-1>0 then if gamepool[touchX,touchY-1,1]=p then k=k+1 endif endif if touchX+1<17 then if touchY+1<9 then if gamepool[touchX+1,touchY+1,1]=p then k=k+1 endif if gamepool[touchX+1,touchY,1]=p then k=k+1 if touchY-1>0 then if gamepool[touchX+1,touchY-1,1]=p then k=k+1 endif endif if k<1 then return if p=1 then if p1-6>0 then return endif if p=2 then if p2-6>0 then return endif if p=1 then p1=p1-6 if p=2 then p2=p2-6 k=0 gamepool [touchX, touchY, 1]=p gamepool [touchX, touchY, 2]=10 gamepool [touchX, touchY, 3]=1 gamepool [touchX, touchY, 4]=100 gosub draw return logic_flag: for i=1 to 16 for j=1 to 8 if gamepool[i,j,2]=1 then gosub l1 if gamepool[i,j,2]=3 then gosub l3 if gamepool[i,j,2]=4 then gosub l4 if gamepool[i,j,2]=5 then gosub l5 if gamepool[i,j,2]=6 then gosub l6 if gamepool[i,j,2]=7 then gosub l7 if gamepool[i,j,2]=8 then gosub l8 if gamepool[i,j,2]=9 then gosub l9 if gamepool[i,j,2]=10 then gosub l10 next i next j gosub draw return die: buff_gamepool[i,j,1]=0 buff_gamepool[i,j,2]=0 buff_gamepool[i,j,3]=0 buff_gamepool[i,j,4]=0 return l1: gosub death buff_gamepool[i,j,1]=0 buff_gamepool[i,j,3]=0 buff_gamepool[i,j,4]=0 return l3: !++++++++++++ gosub death if i-1>0 then if j+1<9 then if gamepool[i-1,j+1,1]<>p then gamepool[i-1,j+1,3]=gamepool[i-1,j+1,3]-gamepool[i,j,4] endif if gamepool[i-1,j,1]<>p then gamepool[i-1,j,3]=gamepool[i-1,j,3]-gamepool[i,j,4] if j-1>0 then if gamepool[i-1,j-1,1]<>p then gamepool[i-1,j-1,3]=gamepool[i-1,j-1,3]-gamepool[i,j,4] endif endif if i>0 then if j+1<9 then if gamepool[i,j+1,1]<>p then gamepool[i,j+1,3]=gamepool[i,j+1,3]-gamepool[i,j,4] endif if j-1>0 then if gamepool[i,j-1,1]<>p then gamepool[i,j-1,3]=gamepool[i,j-1,3]-gamepool[i,j,4] endif endif if i+1<17 then if j+1<9 then if gamepool[i+1,j+1,1]<>p then gamepool[i+1,j+1,3]=gamepool[i+1,j+1,3]-gamepool[i,j,4] endif if gamepool[i+1,j,1]<>p then gamepool[i+1,j,3]=gamepool[i+1,j,3]-gamepool[i,j,4] if j-1>0 then if gamepool[i+1,j-1,1]<>p then gamepool[i+1,j-1,3]=gamepool[i+1,j-1,3]-gamepool[i,j,4] endif endif return !++++++++++++ l4: !++++++++++++ gosub death if i-1>0 then if j+1<9 then if gamepool[i-1,j+1,1]<>p then gamepool[i-1,j+1,3]=gamepool[i-1,j+1,3]-gamepool[i,j,4] endif if gamepool[i-1,j,1]<>p then gamepool[i-1,j,3]=gamepool[i-1,j,3]-gamepool[i,j,4] if j-1>0 then if gamepool[i-1,j-1,1]<>p then gamepool[i-1,j-1,3]=gamepool[i-1,j-1,3]-gamepool[i,j,4] endif endif if i>0 then if j+1<9 then if gamepool[i,j+1,1]<>p then gamepool[i,j+1,3]=gamepool[i,j+1,3]-gamepool[i,j,4] endif if j-1>0 then if gamepool[i,j-1,1]<>p then gamepool[i,j-1,3]=gamepool[i,j-1,3]-gamepool[i,j,4] endif endif if i+1<17 then if j+1<9 then if gamepool[i+1,j+1,1]<>p then gamepool[i+1,j+1,3]=gamepool[i+1,j+1,3]-gamepool[i,j,4] endif if gamepool[i+1,j,1]<>p then gamepool[i+1,j,3]=gamepool[i+1,j,3]-gamepool[i,j,4] if j-1>0 then if gamepool[i+1,j-1,1]<>p then gamepool[i+1,j-1,3]=gamepool[i+1,j-1,3]-gamepool[i,j,4] endif endif return !++++++++++++ l5: !++++++++++++ gosub death if i-1>0 then if j+1<9 then if gamepool[i-1,j+1,1]<>p then gamepool[i-1,j+1,3]=gamepool[i-1,j+1,3]-gamepool[i,j,4] endif if gamepool[i-1,j,1]<>p then gamepool[i-1,j,3]=gamepool[i-1,j,3]-gamepool[i,j,4] if j-1>0 then if gamepool[i-1,j-1,1]<>p then gamepool[i-1,j-1,3]=gamepool[i-1,j-1,3]-gamepool[i,j,4] endif endif if i>0 then if j+1<9 then if gamepool[i,j+1,1]<>p then gamepool[i,j+1,3]=gamepool[i,j+1,3]-gamepool[i,j,4] endif if j-1>0 then if gamepool[i,j-1,1]<>p then gamepool[i,j-1,3]=gamepool[i,j-1,3]-gamepool[i,j,4] endif endif if i+1<17 then if j+1<9 then if gamepool[i+1,j+1,1]<>p then gamepool[i+1,j+1,3]=gamepool[i+1,j+1,3]-gamepool[i,j,4] endif if gamepool[i+1,j,1]<>p then gamepool[i+1,j,3]=gamepool[i+1,j,3]-gamepool[i,j,4] if j-1>0 then if gamepool[i+1,j-1,1]<>p then gamepool[i+1,j-1,3]=gamepool[i+1,j-1,3]-gamepool[i,j,4] endif endif return !++++++++++++ l6: !++++++++++++ gosub death if i-1>0 then if j+1<9 then if gamepool[i-1,j+1,1]<>p then gamepool[i-1,j+1,3]=gamepool[i-1,j+1,3]-gamepool[i,j,4] endif if gamepool[i-1,j,1]<>p then gamepool[i-1,j,3]=gamepool[i-1,j,3]-gamepool[i,j,4] if j-1>0 then if gamepool[i-1,j-1,1]<>p then gamepool[i-1,j-1,3]=gamepool[i-1,j-1,3]-gamepool[i,j,4] endif endif if i>0 then if j+1<9 then if gamepool[i,j+1,1]<>p then gamepool[i,j+1,3]=gamepool[i,j+1,3]-gamepool[i,j,4] endif if j-1>0 then if gamepool[i,j-1,1]<>p then gamepool[i,j-1,3]=gamepool[i,j-1,3]-gamepool[i,j,4] endif endif if i+1<17 then if j+1<9 then if gamepool[i+1,j+1,1]<>p then gamepool[i+1,j+1,3]=gamepool[i+1,j+1,3]-gamepool[i,j,4] endif if gamepool[i+1,j,1]<>p then gamepool[i+1,j,3]=gamepool[i+1,j,3]-gamepool[i,j,4] if j-1>0 then if gamepool[i+1,j-1,1]<>p then gamepool[i+1,j-1,3]=gamepool[i+1,j-1,3]-gamepool[i,j,4] endif endif return !++++++++++++ l7: !++++++++++++ gosub death if i-1>0 then if j+1<9 then if gamepool[i-1,j+1,1]<>p then gamepool[i-1,j+1,4]=gamepool[i-1,j+1,4]-gamepool[i,j,4] endif if gamepool[i-1,j,1]<>p then gamepool[i-1,j,4]=gamepool[i-1,j,4]-gamepool[i,j,4] if j-1>0 then if gamepool[i-1,j-1,1]<>p then gamepool[i-1,j-1,4]=gamepool[i-1,j-1,4]-gamepool[i,j,4] endif endif if i>0 then if j+1<9 then if gamepool[i,j+1,1]<>p then gamepool[i,j+1,4]=gamepool[i,j+1,4]-gamepool[i,j,4] endif if j-1>0 then if gamepool[i,j-1,1]<>p then gamepool[i,j-1,4]=gamepool[i,j-1,4]-gamepool[i,j,4] endif endif if i+1<17 then if j+1<9 then if gamepool[i+1,j+1,1]<>p then gamepool[i+1,j+1,4]=gamepool[i+1,j+1,4]-gamepool[i,j,4] endif if gamepool[i+1,j,1]<>p then gamepool[i+1,j,4]=gamepool[i+1,j,4]-gamepool[i,j,4] if j-1>0 then if gamepool[i+1,j-1,1]<>p then gamepool[i+1,j-1,4]=gamepool[i+1,j-1,4]-gamepool[i,j,4] endif endif return !++++++++++++ l8: !++++++++++++ gosub death if i-1>0 then if j+1<9 then if gamepool[i-1,j+1,1]=p then gamepool[i-1,j+1,4]=gamepool[i-1,j+1,4]+gamepool[i,j,4] endif if gamepool[i-1,j,1]=p then gamepool[i-1,j,4]=gamepool[i-1,j,4]+gamepool[i,j,4] if j-1>0 then if gamepool[i-1,j-1,1]=p then gamepool[i-1,j-1,4]=gamepool[i-1,j-1,4]+gamepool[i,j,4] endif endif if i>0 then if j+1<9 then if gamepool[i,j+1,1]=p then gamepool[i,j+1,4]=gamepool[i,j+1,4]+gamepool[i,j,4] endif if j-1>0 then if gamepool[i,j-1,1]=p then gamepool[i,j-1,4]=gamepool[i,j-1,4]+gamepool[i,j,4] endif endif if i+1<17 then if j+1<9 then if gamepool[i+1,j+1,1]=p then gamepool[i+1,j+1,4]=gamepool[i+1,j+1,4]+gamepool[i,j,4] endif if gamepool[i+1,j,1]=p then gamepool[i+1,j,4]=gamepool[i+1,j,4]+gamepool[i,j,4] if j-1>0 then if gamepool[i+1,j-1,1]=p then gamepool[i+1,j-1,4]=gamepool[i+1,j-1,4]+gamepool[i,j,4] endif endif return !++++++++++++ l9: !++++++++++++ gosub death if i-1>0 then if j+1<9 then if gamepool[i-1,j+1,1]=p then gamepool[i-1,j+1,3]=gamepool[i-1,j+1,3]+gamepool[i,j,4] endif if gamepool[i-1,j,1]=p then gamepool[i-1,j,3]=gamepool[i-1,j,3]+gamepool[i,j,4] if j-1>0 then if gamepool[i-1,j-1,1]=p then gamepool[i-1,j-1,3]=gamepool[i-1,j-1,3]+gamepool[i,j,4] endif endif if i>0 then if j+1<9 then if gamepool[i,j+1,1]=p then gamepool[i,j+1,3]=gamepool[i,j+1,3]+gamepool[i,j,4] endif if j-1>0 then if gamepool[i,j-1,1]=p then gamepool[i,j-1,3]=gamepool[i,j-1,3]+gamepool[i,j,4] endif endif if i+1<17 then if j+1<9 then if gamepool[i+1,j+1,1]=p then gamepool[i+1,j+1,3]=gamepool[i+1,j+1,3]+gamepool[i,j,4] endif if gamepool[i+1,j,1]=p then gamepool[i+1,j,3]=gamepool[i+1,j,3]+gamepool[i,j,4] if j-1>0 then if gamepool[i+1,j-1,1]=p then gamepool[i+1,j-1,3]=gamepool[i+1,j-1,3]+gamepool[i,j,4] endif endif return !++++++++++++ l10: !++++++++++++ gosub death if i-1>0 then if j+1<9 then if gamepool[i-1,j+1,1]<>p then gamepool[i-1,j+1,3]=gamepool[i-1,j+1,3]-gamepool[i,j,4] endif if gamepool[i-1,j,1]<>p then gamepool[i-1,j,3]=gamepool[i-1,j,3]-gamepool[i,j,4] if j-1>0 then if gamepool[i-1,j-1,1]<>p then gamepool[i-1,j-1,3]=gamepool[i-1,j-1,3]-gamepool[i,j,4] endif endif if i>0 then if j+1<9 then if gamepool[i,j+1,1]<>p then gamepool[i,j+1,3]=gamepool[i,j+1,3]-gamepool[i,j,4] endif if j-1>0 then if gamepool[i,j-1,1]<>p then gamepool[i,j-1,3]=gamepool[i,j-1,3]-gamepool[i,j,4] endif endif if i+1<17 then if j+1<9 then if gamepool[i+1,j+1,1]<>p then gamepool[i+1,j+1,3]=gamepool[i+1,j+1,3]-gamepool[i,j,4] endif if gamepool[i+1,j,1]<>p then gamepool[i+1,j,3]=gamepool[i+1,j,3]-gamepool[i,j,4] if j-1>0 then if gamepool[i+1,j-1,1]<>p then gamepool[i+1,j-1,3]=gamepool[i+1,j-1,3]-gamepool[i,j,4] endif endif gosub die return !++++++++++++ death: if gamepool[i,j,3]>0 then gosub die return