def _create_full_cell(self): cell = Cell(serializer("location"), False, False) cell.avatar = serializer("avatar") cell.interactable = serializer("interactable") self.expected = { "avatar": "avatar", "habitable": False, "location": "location", "interactable": "interactable", "partially_fogged": False, } return cell
def _create_full_cell(self): cell = Cell(Serialiser('location'), False, True) cell.avatar = Serialiser('avatar') cell.pickup = Serialiser('pickup') self.expected = { 'avatar': 'avatar', 'generates_score': True, 'habitable': False, 'location': 'location', 'pickup': 'pickup', 'partially_fogged': False } return cell
def get_cell(self, location): if location not in self._cell_cache: cell = Cell(location) cell.avatar = self._avatar self._cell_cache[location] = cell return self._cell_cache[location]