aroberge / reeborg

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

Change path_utils to facilitate creating language agnostic worlds #388

Open aroberge opened 6 years ago

aroberge commented 6 years ago

Currently, if one wants to check path and raise an exception if the proper path is not followed, the way to do this is to include some Python or Javascript specific code in the Post editor. If RUR.check_path was defined with some optional arguments, a simple function call, which would be valid with both Python and Javascript, could handle this case.

Important RUR.public['path'] should be defined as the very first instruction in the ONLOAD editor to avoid problems.