We’ll begin the morning adjusting more tests to use the new Layout idea. This iterative incremental stuff? It really works! The Niagara Falls Method. My starting target for the morning will be tests that use the Cell.create_space(x,y) method, which can be mechanically converted to layout=DungeonLayout(x,y). Now if I’m not mistaken, which assumes facts not in evidence, we can make that change and all the tests will run, even though the test will also be referring to Cell later on, because Cell has a hook to pick up the current Layout. I’ll try a few of these to be sure. No, you know what, let’s bang them all with a replace. There are only 30 and we can always roll back. Replaced 30. Five tests fail. Might be easy enough. Yes, we just needed an import in one test file. We are green. There should be no calls to create_space. Commit: remove Cell.create_space. Reflection This was pleasing, and it would have worked in a giant code base, because we have wired Cell to be able to find the…
No comments yet. Log in to reply on the Fediverse. Comments will appear here.