Added update method to the robot class.