18 minutes ago · 6 min read1134 words · Tech · hide · 0 comments

Hello, loves! While you were away, I did a little refactoring. Let’s see what it shows us. I think we’ve done some good here. I’m still working on paths between sections, and still doing most of the work in the tests. Mostly. Yesterday’s afternoon session, unpublished, made a change to the Passages object. Here’s what our active test looked like when last we met: layout.clear_subregions() path_cells = suite_1.find_extended_path(suite_2) # now path_cells[0] is in one suite, and # path_cells[-1] in the other, and # path_cells[1:-1] are the cells we need for # the new path room. room_2 = path_cells[0].room assert room_2 in suite_2.room_set room_1 = path_cells[-1].room assert room_1 in suite_1.room_set path_room_1_2 = Room(path_cells[1:-1]) layout.add_room(path_room_1_2) layout.make_passages() assert path_cells[0].has_passage(path_cells[1]) assert path_cells[-1].has_passage(path_cells[-2]) yield And now … layout.clear_subregions() path_cells = suite_1.find_extended_path(suite_2) # now…

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