Quantcast

A community for students. Sign up today!

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

wctjerry

  • 2 years ago

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 ?

  • This Question is Open
  1. bwCA
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    u didn't do that in BaseRobot?

  2. bwCA
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    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/

  3. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Ask a Question
Find more explanations on OpenStudy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.