[docs]classDummyBrain(Brain):def__init__(self):super().__init__()self._dummy_value=42# Our brain state. Designated by fair dice roll
[docs]defthinking(self,muscle_id,data_from_muscle):self._dummy_value=(data_from_muscle+1ifdata_from_muscleisnotNoneelse0)returnself._dummy_value# Assume this is the Muscle's "self.iter"
[docs]defload(self):try:self._dummy_value=int.from_bytes(BrainDumper.load_brain_dump(self._dumpers).read(),sys.byteorder,)exceptAttributeError:# We returned "None"pass