Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void switchPlaces(Actor[][] world, Node[] nullArray){
- int count = 0;
- for (int i = 0; i < world.length; i++){
- for (int j = 0; j < world.length; j++){
- if (world[i][j] != null && !world[i][j].isSatisfied){
- int x = nullArray[count].j;
- int y = nullArray[count].i;
- world[y][x] = world[i][j];
- world[i][j] = null;
- count++;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement