Interactions 0 ▲ ronjeffries.com 145 days ago · Tech · hide · Fediverse post Hello, loves! Let’s figure out the new interaction feature, test, and do it. Success but with a reset and a general feeling of clumsiness. I think that the behavior we want is: When moving into a new cell, run the interactions and move if they all return true. (This is the current behavior.) If for any reason the move to a new cell is not allowed, remain where you are, run the interactions (again) there, ignoring the boolean results. How do things work now? Thanks for asking, I was kind of wondering myself. class Dungeon: def move_player(self, direction): new_cell = self.player_cell.attempt_move(direction) if new_cell != self.player_cell: self.place_player_at(new_cell) def place_player_at(self, cell): interactor = Interactor(self, cell) if all(interactor.execute(item) for item in list(self.contents_at(cell))): self.player_cell = cell Looks like we should inspect the Interactor: class Interactor: def __init__(self, dungeon, cell): self.dungeon = dungeon self.cell = cell def… Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town