Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@ladyada
Resolves: #46
In #45 the lines setting
self._x
andself._y
were removed from inside ofgoto()
. That fixed the truncating decimal problem by not setting those values to their integer truncated versions. However,_drawturtle()
was relying on those values in order to update the visible location of the turtle on the display, and as a result now the visible location of the turtle is "behind" by 1 move, it gets placed at the start of the most recently drawn line rather than the end. It also doesn't animate during the drawing of the line like it did before.Solved by adding new variables to track the integer location that the turtle should be at and setting them to the appropriate values inside of
goto()
and use them from inside of_drawturtle()