Climax: Passages 0 ▲ ronjeffries.com 150 days ago · Tech · hide · Fediverse post Hello, loves! Rested, I feel ready to do the passage-generating code. I’ll TDD what I can. Maybe random seed will help. This morning’s test got us close to what we need: def test_border_dictionary(self): layout = DungeonLayout(6,6) r1 = [(1,1), (2,1), (3,1), (4,1), (1,2), (2,2), (3,2), (4,2), (3,3),] r2 = [(1,3), (2,3), (4,3), (1,4), (2, 4), (3,4), (4,4)] r1_cells = [layout.at(*r) for r in r1] r2_cells = [layout.at(*r) for r in r2] room_1 = Room(r1_cells, 'room_1') room_2 = Room(r2_cells, 'room_2') layout.add_room(room_1) layout.add_room(room_2) b_d = layout.border_dictionary(room_1, room_2) assert len(b_d) == 8 print(b_d) entry_3_3 = b_d[layout.at(3,3)] assert len(entry_3_3) == 3 assert layout.at(2,3) in entry_3_3 assert layout.at(3,4) in entry_3_3 assert layout.at(4,3) in entry_3_3 class DungeonLayout: def border_dictionary(self, room_1, room_2): result = dict() for cell_1 in room_1: for cell_2 in room_2: if cell_1.manhattan_distance(cell_2) == 1: self.add_borders(cell_1, cell_2,… 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