The goal was:
Rework the RoomDesigner class into PuzzleDesignerWorld
I didn't feel comfortable with reworking RoomDesigner without first reorganizing a good portion of the game's file structure and splitting the SwitchTile and SwitchTileClient classes each into two. So that's exactly what I did and was very pleased with how well it went.
After reworking the GameManager class, splitting SwitchTile and SwitchTileClient was a breeze. I wanted each to have one version for game play and one version for the puzzle designer. First I copied the class to have a backup. Then I removed anything in the original that was specific to game play and puzzle designer leaving only variables and functions that were needed for both. Next, in the backup, I put a comment marker next to each variable and function that was remaining in the original. Now, with a base class to work off of, I extended that into two separate classes. Finally, in each of those classes, I looked into the backup and copy-pasted anything specific to its scenario.
No comments:
Post a Comment