192 days ago · 8 min read1614 words · Tech · hide · Fediverse post

I’m not sure what I’ll do this morning. Look for something that interests me, I guess. We follow our nose. Refactoring for fun and profit. Ah, here’s something that needs doing. We have no clear scheme for determining the dimensions of the window the game runs in. Let’s see what all we do. We start with a DungeonLayout, which has a specified number of cells in x and y directions. Our main uses 64x56 because anything larger than 56 is too tall for my screen. That information is not saved in DungeonLayout and probably should be: class DungeonLayout: def __init__(self, max_x=10, max_y=10): self.border_map = None self.cells = dict() for x in range(max_x): for y in range(max_y): self.cells[(x,y)] = Cell(x, y) self.rooms = [] We’ll save those values as members. class DungeonLayout: def __init__(self, max_x=10, max_y=10): self.max_x = max_x self.max_y = max_y self.border_map = None self.cells = dict() for x in range(max_x): for y in range(max_y): self.cells[(x,y)] = Cell(x, y) self.rooms =…

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