Open onelife opened 6 years ago
Thanks for this. I used to have 3 examples of the same program but reduced it to 2 and never changed the text. I will need to fix that, as well as the typo "or the".
Instead of generating a new issue ticket, I think I'd better list the issues I found in the same one.
Reeborg is lost in a maze. Have a look at the worlds Maze 1 and Maze 2. Can you think of a way to write a program that could get Reeborg out of both of these mazes? Later, you will learn how to do this and, in fact, you will write a program that could help Reeborg get out of almost any maze you could think of.
There is only one maze world: Maze
Once you have done that, select world Hurdles 2: that's an indoor race, and therefore shorter. (It is also the one illustrated above.) You should be able to remove a few lines of your program and have Reeborg complete that race as well.
Hurdles 2 is not shorter than Hurdles 1 and I can't see the difference between 1 and 2.
After the storm
Maybe it should be a subsection (markup by ---) instead of a subsubsection (markup by ~~~).
Reeborg's parents are so proud of his work, that they ask him to pick up all the leaves that got blown away in their backyard during the windstorm, as illustrated on Storm 3. Have Reeborg pick up all the leaves and put it in the compost bin.
Maybe you want to mention Storm 4 also.
Thanks for these reports. I have completely changed many worlds since the tutorial was written, and did not update the tutorial. I apologize for this. I will try to fix all these mistakes today.
For information:
Previously, Hurdles 2 was with fixed distance and shorter than Hurdles 1. Now, the distance in Hurdles 2 is variable (it is selected randomly each time a program is run) whereas it it still fixed in Hurdles 1.
Previously, Reeborg's orientation was fixed in both Maze worlds; only the starting position distinguished the two worlds. Now, there is a single world but Reeborg's orientation and starting position changes each time a program is run.
With the exception of one customer, mentioned below, get the money (tokens) left by the customer.
There is no money left by customer in world Newspaper. :disappointed:
- Richard Pattis, creator of Karel (an ancestor of Reeborg); Reeborg always leaves a free copy of the newspaper at Pattis's home. Richard Pattis lives on the third floor of his building; the corresponding world is Newspaper 0.
- The nice Ms. Ada Lovelace, who lives on the third floor of her building, always leaves a couple of extra tokens as a gift to Reeborg; hers is world Newspaper 1.
- The old curmudgeon Mr. Charles Babbage, who lives on the fifth floor, always pays the exact amount, leaving no tip for Reeborg; his world is Newspaper 2
When the French library is imported, the online help (available via "Addition options" -> "Help") is updated to include all the French functions available. The only restriction however is that function arguments, such as
"token"
intake("token")
must still be specified in English. To use a version completely translated in French, you must go toLe monde de Reeborg <http://reeborg.ca/monde.html>
_
help()
function. Maybe just talk about help()
function here?I still need to update the tutorial... However, I just added back a Newspaper world with tokens present (and mentioning Ada Lovelace! :-) )
You are certainly free to change any language reference from French to Chinese! Do what you think is right!
challenges1 has been completely rewritten. When I wrote the tutorials, individual worlds/tasks did not include a description (which can be viewed by clicking on world info). The only place where a user could find information about a task was by reading the tutorial. This is no longer the case.
newspaper1 has been edited and include mention of two worlds instead of 3 as before.
(I still have to update the corresponding French version.)
The "Help" available from the additional menu no longer exists; I removed any mention of it from library.rst. I will need to write somewhere more detailed information about help()
including the Javascript version. This should probably be included in https://github.com/aroberge/reeborg-howto after I finish migrating the existing content from https://github.com/aroberge/reeborg-world-creation
def move_until_done():
if at_goal():
# something
move()
if object_here():
# something
# something else
# something else again
repeat 42:
move_until_done()
Complete the above (in the Python Code editor) and make sure it works for all four worlds mentioned above.
I think, it doesn't work for Tokens 4 which is similar to Tokens 5.
from my_lib import turn_right
def jump_over_hurdle():
# some definitions
def move_and_jump_until_done():
# something
if at_goal():
done()
# something
repeat 42:
move_and_jump_until_done()
from my_lib import turn_right
should be from library import turn_right
I think the code
def move_and_jump_until_done():
# something
if at_goal():
done()
# something
should be
def move_and_jump_until_done():
if at_goal():
done()
# something
# something
as my solution is
from library import turn_right
def jump_over_hurdle():
turn_left()
move()
turn_right()
move()
turn_right()
move()
turn_left()
def move_and_jump_until_done():
if at_goal():
done()
move()
jump_over_hurdle()
repeat 42:
move_and_jump_until_done()
Instead of using this description of repeated blocks of code, programmers describe this as a loop: that is, you start with the first instruction (
do_1()
) inside the code block, continue with all the others until you reach the last instruction (do_3()
), then loop back, or go back, to the test just before the beginning of the block and see if the condition is satisfied;if not, you repeat once again the cycle. If the condition never becomesFalse
, you keep repeating and end up with an infinite loop.
I think should be if yes.
This has been rewritten a few days ago. See https://github.com/aroberge/reeborg-docs/commit/233635d9a215129bd63d41d975f0ddc252cd7885
Thanks. I changed it to if so.
The program works for Hurdles 4 but is judged as "desired longer than taken". I think the RUR.check_path
function may have some issue.
The problem for Hurdles 4 was in the way I was recording the correct path as I was building it. I was recording the same point twice at the bottom of the hurdle after jumping over it. It should be fixed now.
I can't find the third version. Is it removed? And ""orthe" should be "or the".