Move tech gain when building lab / academy to faction-board
General clean-up of the code
Fix double dots commands in one line (not intended)
The main change is that subPhase is not stored in engine. When we need to ask the player for a tech tile we do this.processNextMove(SubPhase.TechTile). Same for other subphases. This avoids spreading the code around / having to stop the function. When needing to ask for some input from the player in the middle of a function, we can. This will be useful for taklons & the brainstore.
The income / gaia phase now happens player by player, for example player 2 doesn't receive income until player 1 makes their income actions. Maybe it was already the case, I'm not sure.
The move history is also stored in engine. There's a newTurn variable added in engine. It tells the UI whether to append a move in the current line or the next line. Currently the UI has to guess, and is not always correct.
turnOrder after the setup phase always indicates the order of players to play in the round. In the leech, income & gaia phases, tempTurnOrder is used but turnOrder stays the same. It also helps the UI, now it doesn't have to juggle between the two.
Also:
The main change is that
subPhase
is not stored in engine. When we need to ask the player for a tech tile we dothis.processNextMove(SubPhase.TechTile)
. Same for other subphases. This avoids spreading the code around / having to stop the function. When needing to ask for some input from the player in the middle of a function, we can. This will be useful for taklons & the brainstore.The income / gaia phase now happens player by player, for example player 2 doesn't receive income until player 1 makes their income actions. Maybe it was already the case, I'm not sure.
The move history is also stored in engine. There's a
newTurn
variable added in engine. It tells the UI whether to append a move in the current line or the next line. Currently the UI has to guess, and is not always correct.turnOrder
after the setup phase always indicates the order of players to play in the round. In the leech, income & gaia phases,tempTurnOrder
is used butturnOrder
stays the same. It also helps the UI, now it doesn't have to juggle between the two.