Closed zond closed 3 years ago
Also, take possible build SCs into account
After looking at this, I have reached the following conclusions:
Order corroboration (i.e. internal validation of the players own orders) work by checking the adjudication-method AdjustmentStatus
, and thus gets the same numbers for possible builds/necessary disbands as the resolution would produce. However, it still shows warnings about unexpected number of builds if you have too few SCs where you can build.
Phase messages (i.e. codified messages from adjudicator to client about phase particulars) work by manually counting SCs vs units, which is slightly riskier in case the variant doesn't use "allowed units = nr of SCs" as build rule, but since the AdjustmentStatus
method only checks for one nation this avoids some unnecessary looping. It's used by the client to show a toast in the map view about how much you can build/need to disband, and in the orders view about how much each other player may build/must disband. It doesn't take available home SCs into account for the toast message, which would be nice.
Option filters (i.e. the rules that may block some orders from being available in the client during certain circumstances like "used all your builds") use AdjustmentStatus
, which sort of guarantees their correctness, and they just block more build or disband orders if the user has provided enough.
@tttppp, @JorenC do you have opinions about this? I kind of don't want to throw hours at this problem, that seems to be only about people being told they can/should build more when they don't have any more home SCs available.
I don't know the latest client behavior well enough really. We discussed that ideally the client should warn if orders don't satisfy certain conditions - e.g.
In terms of build rules then I think we have three cases:
I think that they can all be covered with the same logic though.
@tttppp I'm not sure I understand what you want (do we need to fix or implement something?), but to be clear: The only thing missing, as far as I could determine, was that the users sometimes (in a snackbar and in the orders view) were informed that they could/should build more units than they had free buildable home SCs for.
This should be fixed in https://github.com/zond/godip/commit/3dea7874209c7d9c0d825c97c440bfa2e5c9dcc2
Like variants that calculate builds differently