We are about to switch to a new forum software. Until then we have removed the registration on this forum.
`void enemyMove(){
for(int i=0;i<World.WIDTH;i++) { for(int j=0;j<World.HEIGHT;j++) { if(newWorld.LEVEL[j][i]==World.ENEMY) { print(newWorld.LEVEL[j][i]); if(newWorld.LEVEL[j][i-1] == World.WALL){ print("Wall left"); smer = 1;
}
else if(newWorld.LEVEL[j][i+1] == World.WALL){
print("Wall right");
smer = -1;
}
newWorld.LEVEL[j][i+(smer)] = World.ENEMY;
newWorld.LEVEL[j][i] = World.SPACE;
}
}
} }`
Answers
How to add code?:D
https://forum.Processing.org/two/discussion/15473/readme-how-to-format-code-and-text