botgob

Untitled

Jan 28th, 2021
426
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void switchPlaces(Actor[][] world, Node[] nullArray){
  2.         int count = 0;
  3.         for (int i = 0; i < world.length; i++){
  4.             for (int j = 0; j < world.length; j++){
  5.                 if (world[i][j] != null && !world[i][j].isSatisfied){
  6.                     int x = nullArray[count].j;
  7.                     int y = nullArray[count].i;
  8.                     world[y][x] = world[i][j];
  9.                     world[i][j] = null;
  10.                     count++;
  11.                 }
  12.             }
  13.         }
  14.     }
RAW Paste Data