Commands - e-ucm/ead GitHub Wiki
Commands are the minimum operation to change the model (the game project data). Any change over the game model must be done through commands. This part is used to allow the easy implementation of undo and re-do mechanisms.
All commands must extend Command. Command contains methods the execute and undo the command, and also to combine itself with other commands.
We have atomic commands to change minimum pieces of game model data: FieldCommand, to change a field in any object; MultipleFieldCommand to change several fields at once; MapCommand, to change a map; ListCommand, to change a list, among others.
All commands must be execute through Controller#command(Command).
Commands produce Model Events that can be listened by views.