diff --git a/engine/src/engine.ts b/engine/src/engine.ts
index 7d99cb1..77588e8 100644
--- a/engine/src/engine.ts
+++ b/engine/src/engine.ts
@@ -269,7 +269,7 @@ export function move(G: GameState, move: Move, playerNumber: number, fake?: bool
pretty: `${playerNameHTML(player)} bids $${move.data}`,
});
- nextPlayerAuction(G);
+ nextPlayerClockwise(G);
break;
}
@@ -333,7 +333,7 @@ export function move(G: GameState, move: Move, playerNumber: number, fake?: bool
}
}
} else {
- nextPlayerAuction(G);
+ nextPlayerClockwise(G);
}
}
@@ -815,11 +815,21 @@ export function reconstructState(initialState: GameState, log: LogItem[]): GameS
return G;
}
-export function nextPlayer(G: GameState) {
- const index = G.playerOrder.indexOf(G.currentPlayers[0]);
- G.currentPlayers = [G.playerOrder[(index + 1) % G.players.length]];
+export function nextPlayerClockwise(G: GameState) {
+ const index = G.currentPlayers[0];
+ G.currentPlayers = [(index + 1) % G.players.length];
- if (G.players[G.currentPlayers[0]].isDropped && G.players.some((p) => !p.isDropped)) nextPlayer(G);
+ if (G.players[G.currentPlayers[0]].isDropped && G.players.some((p) => !p.isDropped)) {
+ G.players[G.currentPlayers[0]].skipAuction = true;
+ nextPlayerClockwise(G);
+ }
+
+ if (
+ (G.players[G.currentPlayers[0]].skipAuction || G.players[G.currentPlayers[0]].passed) &&
+ G.players.some((p) => !p.skipAuction && !p.passed)
+ ) {
+ nextPlayerClockwise(G);
+ }
}
export function nextPlayerReverse(G: GameState) {
diff --git a/viewer/.eslintrc.js b/viewer/.eslintrc.js
index e2bbe1b..d05b316 100644
--- a/viewer/.eslintrc.js
+++ b/viewer/.eslintrc.js
@@ -4,6 +4,7 @@ module.exports = {
'vue/no-unused-vars': 'error',
'vue/html-indent': ['error', 4, { alignAttributesVertically: false }],
'vue/max-attributes-per-line': 0,
+ 'vue/html-self-closing': 'off',
'vue/attribute-hyphenation': ['error', 'never'],
'vue/singleline-html-element-content-newline': 'off',
'no-case-declarations': 'off',
diff --git a/viewer/src/components/Game.vue b/viewer/src/components/Game.vue
index 32f4344..9455fc1 100644
--- a/viewer/src/components/Game.vue
+++ b/viewer/src/components/Game.vue
@@ -556,7 +556,10 @@
Phases:
- - Determine Turn Order by cities built and highest power plant
+ -
+ Determine Turn Order by number of cities built and highest power plant
+ owned
+
-
Buy Power Plants from the actual market (minimun bid is power plant number)
@@ -618,7 +621,7 @@
Game ends after building phase where a player has {{ G.citiesToEndGame }} or more
cities.
- The winner is the player that can power more cities. Money and number of cities built are
+ The winner is the player that can power the most cities. Money and number of cities built are
tiebrakers.
@@ -627,13 +630,13 @@
| Cities |
-
+
{{ index - 1 }} |
| Payment |
-
+
${{ G.paymentTable[index - 1] }} |
@@ -1153,7 +1156,7 @@ export default class Game extends Vue {
return 'Choose a Power Plant to start an auction.';
} else if (currentPlayer.availableMoves![MoveName.Bid]) {
- return "It's your turn to bid!";
+ return 'It\'s your turn to bid!';
} else if (currentPlayer.availableMoves![MoveName.BuyResource]) {
return 'Buy resources on the market, or pass.';
} else if (currentPlayer.availableMoves![MoveName.Build]) {
@@ -1170,7 +1173,7 @@ export default class Game extends Vue {
return 'Choose which resources to discard.';
}
- return "It's your turn!";
+ return 'It\'s your turn!';
} else {
let log = (this.G.log[this.G.log.length - 1] as LogMove).pretty;
if (log) {
diff --git a/viewer/src/self-contained.ts b/viewer/src/self-contained.ts
index 5054c46..fae899f 100644
--- a/viewer/src/self-contained.ts
+++ b/viewer/src/self-contained.ts
@@ -8,7 +8,7 @@ function launchSelfContained(selector = '#app') {
const emitter = launch(selector);
- let gameState = setup(2, {});
+ let gameState = setup(6, {});
for (let i = 0; i < gameState.players.length; i++) {
gameState.players[i].name = `Player ${i + 1}`;
@@ -27,7 +27,7 @@ function launchSelfContained(selector = '#app') {
emitter.emit('state', cloneDeep(strip ? stripSecret(gameState, playerIndex) : gameState));
- let delay = 200;
+ let delay = 1000;
while (gameState.players.some((pl) => pl.isAI && pl.availableMoves)) {
gameState = moveAI(
gameState,
@@ -36,7 +36,7 @@ function launchSelfContained(selector = '#app') {
let newState = cloneDeep(strip ? stripSecret(gameState, playerIndex) : gameState);
console.log('new game state', newState);
setTimeout(() => emitter.emit('state', newState), delay);
- delay += 200;
+ delay += 1000;
}
console.log('available moves', gameState.players[playerIndex].availableMoves);
@@ -49,7 +49,7 @@ function launchSelfContained(selector = '#app') {
emitter.emit('player', { index: playerIndex });
emitter.emit('state', cloneDeep(strip ? stripSecret(gameState, playerIndex) : gameState));
- let delay = 200;
+ let delay = 1000;
while (gameState.players.some((pl) => pl.isAI && pl.availableMoves)) {
gameState = moveAI(
gameState,
@@ -57,7 +57,7 @@ function launchSelfContained(selector = '#app') {
);
let newState = cloneDeep(strip ? stripSecret(gameState, playerIndex) : gameState);
setTimeout(() => emitter.emit('state', newState), delay);
- delay += 200;
+ delay += 1000;
}
console.log('available moves', gameState.players[playerIndex].availableMoves);