It doesn't do anything.
checking your MyWorld code, you didn't add any actors in the world. The line should be like this: addObject(new CodeMonkey(), 120, 140);
checking your CodeMonkey code, it works fine, but has one problem. you set the image in the act method, so you are putting the same image over and over again.
Create a constructor for your class
public CodeMonkey() {
setImage("CodeMonkey.png");
}
or simply set the image using the right button in the class, and then use menu option "Set image..."
May I suggest a change?
In class Mobil instead of using turn(45), use
setRotation(0); // right
setRotation(180); // left
setRotation(90); //down
setRotation(270); //up
and move(5);
and you can delete the nested if -elses, arah variable and the setLocations
@Mik, I downloaded your game, and sends one Error.
Class Board, method getGoldMarble(), Line:
List<Actor> marbles = getObjects (GoldMarble.class); //incompatible types
Solution, chance Actor to GoldMarble.
I obviously don't think you made a mistake, I suppose the problem are Greenfoot or Java updates.
2017/8/1
Battleship
2017/8/1
Tutorial POO
2017/7/30
Battleship
2017/2/11
Simple Adventure Game
2017/2/3
Battleship
2017/1/31
Battleship
2016/5/26
Killer Queen
2016/5/25
Chase the Elephants
2016/5/11
Marbles