aroberge / reeborg

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

Document of OOP part is contain many bug #294

Closed mu-hun closed 8 years ago

mu-hun commented 8 years ago

Reeborg has always oil leak

AttributeError

no attribute orientation for [object Object]

Solution

class CompassNeedle(UsedRobot):

    def is_facing_south(self):
        # return self.body._orientation == RUR.SOUTH : AttributeError!!
        facing_south = self.body._orientation == RUR.SOUTH
        return facing_south

reeborg = CompassNeedle()
while not reeborg.is_facing_south():
    reeborg.turn_left()

NameError : inspect()

ReferenceError : inspect() is not defined

aroberge commented 8 years ago
aroberge commented 8 years ago

Regarding inspect, this was changed to dir_js in the code, as the output is similar to Python's dir. The documentation should be updated to reflect this.

aroberge commented 8 years ago

Documentation has been updated to use _orientation and dir_js.

Problem with leak remains.

mu-hun commented 8 years ago

Thanks

aroberge commented 8 years ago

Problem with oil leak still remains.