Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 8 Online
OpenStudy (anonymous):

when doing ps6, I met with some difficulty with setRobotPosition of class Robot. Is it OK just add one line 'self.position = to position' ? I wrote some test codes to show it briefly. Let's have a look. http://pastebin.com/LfKh8mad In setPosition method, self.position should be updated but it didn't. It puzzles me a lot. Someone knows why ?

OpenStudy (anonymous):

u didn't do that in BaseRobot?

OpenStudy (anonymous):

i had a hunch - don't know why maybe some circular referencing going on?? this seems to work - i change the argument names http://dpaste.com/816471/

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!