aroberge / reeborg

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

World does not reset properly #407

Closed aroberge closed 6 years ago

aroberge commented 6 years ago

The result: an inconsistent world.

aroberge commented 6 years ago

This is not really a bug. The world Around 4 contains artefacts already put in in a world of a fixed size. The state of this world is saved before running. There is no actual instruction to set (or reset!) the size - nor should there need to be.

When RUR.create_maze() is run, the canvas dimensions are changed - and nothing in the normal reload function is in place to reset such worlds: worlds with sizes created dynamically should normally be created entirely in the Onload editor rather than using a combination of fixed-position artefacts (put in place using the Graphical world editor) and code.