public class MyWorld extends TK2934World { /** * Constructor for objects of class MyWorld. * */ public MyWorld() { super(750, 580); displayTimer(); resetTimer(100); startTimer(); MoveRightTile r = new MoveRightTile(); addObject(r,500,300); Robot robot = new Robot(); addObject(robot,50,100); //Robot.setMoving(false); } public class Robot extends Runner { /** * Act - do whatever the Robot wants to do. This method is called whenever * the 'Act' or 'Run' button gets pressed in the environment. */ boolean moving=true; public Robot() { //super(); int dx=5; int dy=0; setDirection(dx,dy); } public void runningAct() { //super.runningAct(); if(moving) { super.runningAct(); } } public boolean setMoving() { //moving = test; return true; } }