Hi all! Fairly new to greenfoot / programming, and I have hit a bit of a wall.
I need my object to change direction after it has moved +10 on the y axis, but the if statement is completely ignored by the program
Any assistance would be greatly appreciated.
Cheers!
public void act() { move(1); setRotation(45); if(getY() == getY() + 10){ move(1); setRotation(110); } }