fix: added further checks to lesson 5 practice 2 with better error messages #262
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.
Please check if the PR fulfills these requirements:
Related issue (if applicable): #256
What kind of change does this PR introduce?
Adds a check to practice 2 in lesson 5 that will determine if there are too few or too many points in the polygon, showing a similar, yet more precise error message. Note that the user must have made 3 polygons for this to happen.
Most of these boil down to the draw_square function having been rewritten or draw square being called more than once in a row (with 3 successful polygons). Though I doubt the second reason would happen normally, hence why the error message asks for if the draw square function has been rewritten, and not if it was called twice.
Does this PR introduce a breaking change?
No