learn-gdscript
learn-gdscript copied to clipboard
Lesson 16 exercise 1 a "whoops you created an infinite loop" message could be good
Issue description: In 16. Introduction to While Loops 1. Moving to the end of a board, if you write down
func move_to_bottom(): while cell.y < board_size.y-1: cell += Vector2(1,0)
(ie, accidentaly increasing the X rather than the Y) The robot will dissapear off-screen, with only a "ERROR: The robot isn't at the bottom of the game board. Did you increase its cell.y coordinate?" error message.
In 16. Introduction to While Loops it says if you create an infinite loop the application may freeze n such; having a error log that says "Whoops, you made an infinite loop! It would have crashed if done outside of this website" or something similar would make more sense than a generic "Did you remember to change cell.y?".
I think this would improve the learning experience by teaching about application freezes (if the player accidentaly makes one here)