Open dagguh opened 3 years ago
Vertical shrinking was trivial:
Now I'm fixing the bug with action brackets opening in the past turns. It's a big problem, because the whole code assumed that there's the game.corp.turn
and the game.runner.turn
without considering that they pass. The CorpTurn
and RunnerTurn
classes begun as stateless, so it was never a problem. The only state they got was event handlers. The old TimeCross
was only appending immutable views, so representations of past actions weren't affected by that shared state. But now I'm registering dynamic views of turns/actions, so the classes. I'm rewriting the timing code to create new instances of turns, action windows, etc. instead of relying on mutable singletons.
The bug uncovered a ton of fundamental bad design. The timings were done ad hoc. Sometimes opening of a priority window was done as a cost, sometimes as a C# Task
, sometimes relying on the GUI rather than the engine, sometimes as callbacks.
I started remodelling the timing and priority according to the game rules: #2036
Sneak peek:![image](https://user-images.githubusercontent.com/1194704/113633059-92e44580-966c-11eb-8886-4283e6c36fb6.png)
Gotta:
TimeCross
[ content ]