Writing a method
void move(Dot sideOrUp); method
I need tips on what is the best way to do this. The move method changes
the position of the entire segment by moving the lower point to the new
position. In other words, the entire segment moves, without changing its
length or angle, so that the lower point is in the new position. For
horizontal segments (where both endpoints have the same y coordinate), it
moves the left point to the new position.
would it be better to use an if statement?
No comments:
Post a Comment