Advertisement
pierrotdu18

Untitled

Aug 31st, 2014
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. global a=[],b=[];function c(){var f=getCell();push(a,f);while(a!==[]){var d=shift(a);
  2. push(b,d);var x=getCellX(d),y=getCellY(d);var e=[getCellFromXY(x+1,y),getCellFromXY(
  3. x-1,y),getCellFromXY(x,y+1),getCellFromXY(x,y-1)];for(var g in e){if(g==null or
  4. isObstacle(g))continue;if(inArray(b,g))continue;if(!inArray(a,g)){push(a,g);}}}}
  5. if(getTurn()==1)c();mark(b,getColor(255,0,0));debugW(getInstructionsCount());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement