powergrid-viewer 1.11.1 → 1.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "powergrid-viewer",
3
- "version": "1.11.1",
3
+ "version": "1.11.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/boardgamers/powergrid.git",
@@ -18,7 +18,7 @@
18
18
  "vue": "^2.6.11",
19
19
  "vue-class-component": "^7.2.3",
20
20
  "vue-property-decorator": "^8.4.2",
21
- "powergrid-engine": "1.15.1"
21
+ "powergrid-engine": "1.15.2"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@types/assert": "^1.4.7",
@@ -1118,12 +1118,9 @@ export default class Game extends Vue {
1118
1118
  playerHasUsedFreeJump(playerIndex: number): boolean {
1119
1119
  const player = this.G?.players[playerIndex];
1120
1120
  if (!player) return false;
1121
- // Primary: trust the engine flag (set for all new games).
1122
1121
  if (player.usedFreeJump) return true;
1123
- // Fallback: detect from network topology for game states where
1124
- // usedFreeJump wasn't tracked (games started before that field existed).
1125
1122
  if (player.cities.length >= 2) {
1126
- return countNetworks(this.G!.map.connections, player.cities.map(c => c.name)) >= 2;
1123
+ if (countNetworks(this.G!.map.connections, player.cities.map(c => c.name)) >= 2) return true;
1127
1124
  }
1128
1125
  return false;
1129
1126
  }