These are specific things that need to be done for each role:
General:
[x] Create function that checks if we have enough resources, and if yes, already informs the captain, and if no, already sends an error message.
[x] Also allow this function to do CUMULATIVE cost checks
[x] Differentiate error messages. (Now it just does a default "Action by failed!")
Captain:
[x] Make tasks work. Send signal back to server (handle it), remove button, pop it off the task list
[x] Create error messages. Whenever an upgrade/action doesn't succeed, the captain gets the message "An action by the ROLE NAME didn't succeed.".
[x] Store these messages (in case we're not on the captain tab now). Allow them to be clicked away from the interface (and permanently from the messageLog).
First Mate:
[x] Check if the compass image doesn't drag anymore. (And if touch works.)
Cartographer:
[x] Decide a global map size (width/height) and tile size. (Look at my test scenario on WAMP, those values seemed right.)
[x] Display our own ship image
[x] Save and display all unit information (what you get is determined by the server, based on your level)
Sailor:
[x] Spend crew when setting sails/peddles
[x] (Subtract the current crew input for sails/peddles and apply the delta.)
[x] (Send message to captain with updated crew, or an error message if it failed.)
Weapon Specialist:
[x] Allow buying of cannons
[x] Calculate cumulative cost (as an exception in the loadUpgradeButton)
Once all these things are fixed, the role interfaces are finished. I should move towards making sure turns work (roles receive the correct information at the start of a new turn, and reset/clean the right variables within their own system).
These are specific things that need to be done for each role:
General:
Captain:
First Mate:
Cartographer:
Sailor:
Weapon Specialist:
Once all these things are fixed, the role interfaces are finished. I should move towards making sure turns work (roles receive the correct information at the start of a new turn, and reset/clean the right variables within their own system).
Then, I can make the monitor do fancy stuff.