aroberge / reeborg

Enhanced Karel-the-robot clone
http://reeborg.ca/reeborg.html
Other
47 stars 36 forks source link

Define run_pre() and run_post() for use in the repl #363

Closed aroberge closed 7 years ago

aroberge commented 7 years ago

Currently, the "pre" code is automatically executed when a world is loaded with the repl activated. For more flexibility, this should be changed and the user given the control to do run_pre() and run_post() when needed.

When this is done, "Done" should be also redefined so that it does run_post() automatically as well.

Finally, the "world examples" tutorial will need to be corrected as it describes the current default.

aroberge commented 7 years ago

The equivalent to run_post() is already include in done() when running from the repl. Since this is the case, there is little reason not to do run_pre() automatically when loading a world from the repl.