This site requires JavaScript, please enable it in your browser!
Greenfoot back
iElucien
iElucien wrote ...

2019/10/18

Moving in a rectangular shape given 2 integers

iElucien iElucien

2019/10/18

#
I'm very new to java and my instructor threw a curve ball at me telling me to have an object move in a rectangular pattern. I know that I need a constructor but I'm not sure about how to go about it.
danpost danpost

2019/10/18

#
iElucien wrote...
I'm very new to java and my instructor threw a curve ball at me telling me to have an object move in a rectangular pattern. I know that I need a constructor but I'm not sure about how to go about it.
You do not need a constructor -- all you need is an act method with a move command and four sets of conditions, one set per turn. HINT: make use of the actor's rotation as a condition in each set.
You need to login to post a reply.