aroberge / reeborg

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

orientation attribute should be private #218

Closed aroberge closed 8 years ago

aroberge commented 8 years ago

When creating a new robot through UsedRobot(), the orientation argument has to be a string indicating a cardinal direction; however, the orientation attribute after a robot is created is an integer between 0 and 3 (inclusive). To reflect the difference, the attribute should be renamed _orientation.

aroberge commented 8 years ago

In the first commit, I've done the replacement ".orientation" by "._orientation"; however worlds imported had the orientation attribute set so code had to be included to take care of this. (I did not do a full check prior to committing).

In the documentation, there will be remaining mentions of "orientation" instead of "_orientation" which will need to be adresse individually.

aroberge commented 8 years ago

Moved to #209.