forked from hedyorg/hedy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[LANGUAGE] Improve pressed command (hedyorg#4146)
Fixes hedyorg#4138, This PR changes how the _ifpressed_ command works. **From level 5 till level 15: it is required to use an else** ``` if x is pressed print "x!" else print "other one" ``` **From level 15: using it without else is allowed** ``` if x is pressed print "x!" ``` **From level 17: using it with elif is possible (The drawing game !!)** ``` repeat 20 times if w is pressed: forward 20 elif a is pressed: turn -90 elif d is pressed: turn 90 elif s is pressed: forward -20 ``` I added an error when the user forgets to add the else in level 5 till 15, still need to figure out how to make translatable messages ![afbeelding](https://user-images.githubusercontent.com/48225550/226071609-860bc535-159f-458c-b5a1-223ce2425896.png) **Still To-Do:** - [x] Add/Fix tests
- Loading branch information
Showing
75 changed files
with
936 additions
and
4,256 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.