if (getX()<=9)
{
World myWorld = getWorld();
MyWorld wow = (MyWorld)myWorld;
Counter1 counter1 = wow.getCounter1();
counter1.addCount();
setRotation(540-getRotation());
move(5);
}
if (getX()>=598)
{
World myWorld = getWorld();
MyWorld wow = (MyWorld)myWorld;
Counter counter = wow.getCounter();
counter.addCount();
setRotation(540-getRotation());
move(-5);
}
if (getY() < 10 || getY() > getWorld().getHeight()-10)
{
setRotation(360-getRotation());
}

