Point of clarification


I know that those who haven’t had CPSC 240 are wrestling a little bit with this whole notion of “writing a class that has methods which some other code (not written by you) will call.” So just to clarify:

Nowhere in your code will you call any of the following methods:

  • .decide_against()
  • .inform_foaf()
  • .request_rewire()

Instead, my simulator will be calling those methods of yours (specifically, if you care, on lines 220, 151, and 254 of model.py, respectively.)

So don’t get wrapped around the axle trying to figure out where to call your own .request_rewire() method. You won’t call it. I will.

In contrast, your code will call:

  • self.model.request_foaf_info_from()

when you want to know who your neighbors’ neighbors are (and their play histories).

Send email if you’re confused about any of this. I’m happy to explain.


Leave a Reply

Your email address will not be published. Required fields are marked *