Skip to content

Commit 9b9ea65

Browse files
committed
Fix: fixed lesson 5 part 2 faulty check logic
1 parent 96678d2 commit 9b9ea65

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

course/lesson-5-your-first-function/TestsDrawingThreeSquares.gd

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ func test_draw_three_squares_of_200_pixels() -> String:
2020
return tr("You only drew one square. You need to draw three.")
2121
elif count < 3:
2222
return tr("You need to draw three squares.")
23-
elif count > 3:
24-
if polygons.size() == 4 and not polygons.back().is_empty():
23+
elif count == 4:
24+
if not polygons.back().is_empty():
2525
return tr("You drew more than three squares. You need to draw only three!")
26+
elif count > 4:
27+
return tr("You drew more than three squares. You need to draw only three!")
2628

2729
var index := 1
2830
for p in polygons:

0 commit comments

Comments
 (0)