As work on more of the corse UI stuff commences, we need to think about how Orders get routed through the different modules. Most orders will be created (by human users) through interaction with the UI. For example, "Move Ship A from System X to System Y". For a given turn, I think we need to keep an OrderSet object containing all actions a player wants to perform that turn. When the user clicks END_TURN, we pass those orders on to wherever they need to go. Oceanmachine suggested that the Empire objects take care of the Orders...which then get passed on to the server.
Also, we need to provide a means of validating Orders immediately. If a player wants to try something that isn't possible, the UI needs to either not allow the order, or to tell the user that the action cannot be performed. So, whichever module does the order processing client-side, will also need to provide a function like :
Code: Select all
bool ValidateOrder(const Order&);