Better Steps 0 ▲ ronjeffries.com 116 days ago · 6 min read1129 words · Tech · hide · Fediverse post Hello, loves! Stepping is working. Let’s make it more nearly right. I think an object is called for. Tout le monde déteste l’IA. What, you may wonder, makes me think that we need an object? There are a few clues, and one of them is quite strong. Here’s the build_table as created in ‘main’: def make_build_table(): return [ make_diamond_in_round_room, make_a_diamond_room, make_a_round_room, make_random_rooms, finish, populate, add_content, ] This is just a list of functions, intended to be called with a Layout and a Dungeon. One clue (1) is here: this list is quite specialized inside, and yet it is just a simple list. Very special contents often suggests a special object to contain the very special contents. Here is the code, in KeyPress, fetching the list and initializing to use it: class KeyPress: def __init__(self, view, dungeon, pub_sub): from main import make_build_table # <=== self.view = view self.dungeon = dungeon self.pub_sub = pub_sub self.key_lock = None self.build_table =… 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