Saturday, March 8, 2014

Overwrite Options and Group Operations

I have added two new features to my PlanningLevel object. The first is the ability for the user to choose overwrite behavior. If a player were to try to move an instruction from one grid cell to another that was already occupied, there are two ways that the operation could be finished. Either the old instruction is deleted, and the moved instruction put in its place, or the move operation is rejected, leaving both cells unchanged. I have implemented support for both, and it is up to the player to decide which they prefer. This makes undoing an operation more complicated. In order to undo properly, not only does the moved instruction need to be returned to its starting cell, but the overwritten instruction needs to be replaced.

The second feature I added was support for group operations. There is now a group version of each of the original five operations. These functions take a list of instructions or coordinates, and apply their operation to all of the instructions in the list. This will allow the user to drag select and delete or move a whole bunch of instructions at once.

No comments:

Post a Comment