Skip to content

Commit 35a80ef

Browse files
authored
Merge pull request #1149 from mstphayassin/bugfix/l5-2-infinite-squares
Fix: fixed lesson 5 part 2 faulty check logic
2 parents 96678d2 + 9b9ea65 commit 35a80ef

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)