Welcome to the CSC Q&A.
Get help and give help!
Write great code!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+4 votes

Hi there, does anyone know anything about turtle module for basic game development. I am watching Youtube for desgining basic game and found that the turtle module is quite useful. One thing I am curious about is the difference between the goto() method in turtle and move() method in graphics. Is the way these two methods are used similarly or differently to each other? How different they are? Thank you.

asked in CSC201 Spring 2021 by (8 points)

1 Answer

+2 votes

I think GOTO x y would be more equivalent to .setCenter(x, y).

Our graphics module doesn't the forward and left/right turtle commands though.

To replicate that kind of behavior, your graphics object would have to keep track of the angle it is pointing at, and then call .move(dist math.cos(angle), dist math.cos(angle))...

answered by (302 points)
...