A player recently sent me a message about a bug with undo related to this game.
https://boardgamearena.com/gamereview?table=298394399
If you scroll down to about move 200 you can see a green tile being placed followed by scoring 1 point, then undo removing 2 points. This is because the advanced civilization building was part of a "region" (a set of tiles on the board with no leader) that was joined during placement. The code currently only looks at the kingdom at time of placement when checking for adv civ buildings, while the undo code does the same in reverse and thus the problem where one code block sees it and the other doesn't.
Fixing the bug is relatively trivial, however the question is in which direction should it be fixed. Close reading of the rulebook has not clarified the situation. Here are some bits from the rulebook...
Advanced Civilization Buildings
https://boardgamearena.com/gamereview?table=298394399
If you scroll down to about move 200 you can see a green tile being placed followed by scoring 1 point, then undo removing 2 points. This is because the advanced civilization building was part of a "region" (a set of tiles on the board with no leader) that was joined during placement. The code currently only looks at the kingdom at time of placement when checking for adv civ buildings, while the undo code does the same in reverse and thus the problem where one code block sees it and the other doesn't.
Fixing the bug is relatively trivial, however the question is in which direction should it be fixed. Close reading of the rulebook has not clarified the situation. Here are some bits from the rulebook...
Advanced Civilization Buildings
Tile PlacementWhen a player places a tile in a kingdom containing a building of the corresponding color, the reward for the respective leader (or the king if the leader is absent) increases from one to two victory points. (Rewards for conflicts or monuments remain unaffected.)
If the tile is placed in a kingdom, and this kingdom contains a leader of the same color, then the victory point is gained by the player controlling that leader.
On RegionsVictory points are gained immediately when a tile is placed.
So the question is, if you score a point "immediately when a tile is placed", do you look at the kingdom resulting from the placement or preceding it.A REGION is any area on the game board covered by a lonetile (e.g., a temple) or two or more linked tiles. Regions do not contain leaders. At the start of the game there are ten distinct, one-tile regions