Sorceress

Untitled

May 7th, 2016
189
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. p=0;
  2. for( x = 0; x < gridMax; x++ ){
  3. for( y = 0; y < gridMax; y++ ){
  4. if(x+1 < gridMax && grid[x,y].RoomHere != grid[x+1,y].RoomHere) p++;
  5. if(y+1 < gridMax && grid[x,y].RoomHere != grid[x,y+1].RoomHere) p++;
  6. }
  7. }
  8.  
  9. //p holds the perimeter
RAW Paste Data