1 day ago · 8 min read1539 words · Tech · hide · 0 comments

Hello, loves! This afternoon I want to explore some alternative notions around the Cell topics raised this morning. Very promising results! Here, as a refresher, are this morning’s thoughts: There are a couple of issues that come up for me, looking back over the morning: There are a lot of methods in DungeonLayout about cell is this cell is that. This is feature envy: Cells are not very helpful. They have essentially no behavior and do not know anything beyond their coordinates. I do not see a way to improve that much, unless we gave them all a pointer back to the layout. And that seems wrong to me. Similarly, if a Cell knew its Room that would sometimes be helpful. Again, we do not like to have objects pointing to their containers. A low level design property of the current code is that methods returning a Cell can also return None, which means that a lot of other code then has to check that result. It is possible that a Missing Object approach might be helpful here. That might be an…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.