So Do It 0 ▲ ronjeffries.com 2 hours ago · 8 min read1582 words · Tech · hide · 0 comments Hello, loves! OK, let’s do the thing we love: find something to improve, and improve it. Shall we start where we left off? Result: Not as joyful as some days. We pared down the RoomView by removing its references to layout, dungeon, and dungeon view, passing them as parameters when they were needed. Pretty much what the received wisdom would suggest and I’ve done it many times and don’t recall ever regretting it. There is a place for encapsulating a bunch of objects that need to be processed together, often using the pattern called Method Object that replaces a method with a small object bound to the info needed to do one thing, but as a rule, long-standing objects that connect to lots of other objects just make things hard to change and hard to test. One could wonder why I do it so often. Let’s start by looking at RoomView again and thinking about what we have wrought. class RoomView: def __init__(self, room): self.room = room self.sprites = [] self.cell_sprites = dict()… No comments yet. Log in to reply on the Fediverse. Comments will appear here.