Skip to content

Commit ddd3054

Browse files
committed
Revert "Fix: fixed error messages in lesson 20 part 2 (#1146)"
This reverts commit 0aa4561. Close #1150
1 parent 0aa4561 commit ddd3054

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

game_demos/DrawingTurtle.gd

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,11 @@ func move_forward(distance: float) -> void:
5959
previous_point = _points[-1]
6060
var new_point := previous_point + Vector2.RIGHT.rotated(deg2rad(turn_degrees)) * distance
6161
new_point = new_point.snapped(Vector2.ONE)
62-
var is_closed := false
63-
# Consider the polygon closed if a coordinate is repeated.
64-
if new_point in _points:
65-
is_closed = true
6662
_points.append(new_point)
63+
6764
_temp_command_stack.append(
6865
{command = "move_to", target = new_point + position + _current_offset}
6966
)
70-
if is_closed:
71-
_close_polygon()
7267

7368

7469
func turn_right(angle_degrees: float) -> void:

0 commit comments

Comments
 (0)