{
/**
* Act - do whatever the Alien wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
//this.move(1);
if (direction)
{
this.move(3);
}
else
{
this.move(-3);
}
if (direction)
{
if(this.getX()>=510)
{
direction = false;
}
}
else if(this.getX()<=32)
{
direction = true;
}
}
}
