6.00.2x-pset2.py
def updatePositionAndClean(self):
        """
        Simulate the passage of a single time-step.

        Move the robot to a new position and mark the tile it is on as having
        been cleaned.
        """
        newDirection = self.currentDirection
        while newDirection == self.currentDirection:
            newDirection = random.randrange(0, 360)
        self.currentDirection = newDirection
        # Line bellow broken to comply with pep8
        newPosition = self.currentPosition.getNewPosition(
                      newDirection, self.speed
                      )
        if self.room.isPositionInRoom(newPosition):
            self.currentPosition = newPosition
            self.room.cleanTileAtPosition(self.currentPosition)

        Simulate the passage of a single time-step.

        Move the robot to a new position and mark the tile it is on as having
        been cleaned.
        
Simulate the passage of a single time-step.
Move the robot to a new position and mark the tile it is on as having
been cleaned.
Simulate the passage of a single time - step . Move the robot to a new position and mark the tile it is on as having been cleaned .
def updatePositionAndClean(self):
        newDirection = self.currentDirection
        while newDirection == self.currentDirection:
            newDirection = random.randrange(0, 360)
        self.currentDirection = newDirection
        newPosition = self.currentPosition.getNewPosition(
                      newDirection, self.speed
                      )
        if self.room.isPositionInRoom(newPosition):
            self.currentPosition = newPosition
            self.room.cleanTileAtPosition(self.currentPosition)
def updatePositionAndClean ( self ) : newDirection = self . currentDirection while newDirection == self . currentDirection : newDirection = random . randrange ( 0 , 360 ) self . currentDirection = newDirection newPosition = self . currentPosition . getNewPosition ( newDirection , self . speed ) if self . room . isPositionInRoom ( newPosition ) : self . currentPosition = newPosition self . room . cleanTileAtPosition ( self . currentPosition )
Simulate the passage of a single time-step.
Simulate the passage of a single time - step .
"""
        Simulate the passage of a single time-step.

        Move the robot to a new position and mark the tile it is on as having
        been cleaned.
        """ # Line bellow broken to comply with pep8
self