-
-
Notifications
You must be signed in to change notification settings - Fork 183
Improvements to lesson 17 and 18 #641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvements to lesson 17 and 18 #641
Conversation
@@ -122,9 +122,49 @@ title = "" | |||
type = 0 | |||
text = "In the above example, for each item in the list [code][0, 1, 2][/code], Godot sets [code]number[/code] to the item, then executes the code in the [code]for[/code] loop. | |||
|
|||
In this example, we're printing the value of [code]number[/code] as Godot moves through the loop. | |||
We'll get to explain arrays more throughly in the next lesson, but pay notice on the fact that [code]number[/code] is just a variable you are assigning values to using the [code]for[/code] loop, and you could name it anything you want. The above code has the exact same behaviour as the next example:" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pay notice of the fact that -> redundant, maybe incorrect, but for conciseness, just notice that
is good. Avoid extra words like "more"
Use US English: behaviour -> behavior
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other conciseness examples: exact same -> same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The above code has the exact same behaviour as the next example
Edited:
This code behaves the same as the previous example
fix #626
fix #612
fix #593
fix #615
fix #589
Related issue (if applicable): #636 , #626, #612, #593, #615, #589
There were a lot of small but good suggestions for lessons 17 and 18, this pull request tries to solve most of them.
What kind of change does this PR introduce?
cell
in lesson 17cell
tocurrent_cell
in the real code as well), I thought it would be best to leave this to a different PR.This does add some repetition between lesson 18 and lesson 19 (it's mostly the same thing and examples on both lessons), but lesson 19 later explains arrays more thoroughly, while lesson 18 just use them on loops.
Also, I couldn't figure out a way to "unwrap" lesson 17 while-loops without giving room for misinterpretation. The problem is that while-loops branch out only when the condition is not true anymore, unlike the for-loops we used as examples that had a compile-time finite amount of loops. So unwrapping the while-loop as:
May give the impression that it works similar as the for-loop in the sense that
while value < 4
will always repeat the code for times max.Does this PR introduce a breaking change?
Nope.