Closed lpkirwin closed 3 years ago
(This is admittedly a pretty minor issue)
i suspect that we intend it so you can't do this actually as at the start of the turn any of the resource transfer actions would fail. would be good to add a test for this
After discussion we decided that the current implemented behavior is what it will be and this will not change.
So is the current implementation to process the Actions "in the order they are pushed into the object"?
This is not correct. What happens is all actions are validated in the order they are given such that when actions execute, order does not matter.
It looks like unit actions are handled sequentially in an arbitrary order. This might cause some confusing behaviour where actions that might seem valid/reasonable will silently fail.
Eg if I had:
and I wanted to do two transfers so that worker_1 can go build a city:
this may or may not work, depending on the order of execution. If worker_2 did its transfer first, it would silently fail because worker_1 is at capacity.