code for proof system
This commit is contained in:
@ -146,10 +146,6 @@ document.addEventListener("ACT", async (ev) => {
|
||||
game.currentPlayer().endTurn();
|
||||
}
|
||||
}
|
||||
|
||||
if (game.allReinforcementsPlaced()) {
|
||||
game.incrementState();
|
||||
}
|
||||
} else {
|
||||
if (await game.currentPlayer().act(data)) {
|
||||
game.currentPlayer().endTurn();
|
||||
@ -161,6 +157,12 @@ document.addEventListener("ACT", async (ev) => {
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener("endTurn", () => {
|
||||
if (game.isPregame() && game.allReinforcementsPlaced()) {
|
||||
game.incrementState();
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener("gameStateUpdate", async () => {
|
||||
if (game.isPregame()) {
|
||||
let firstPlayerIndex = await random.get(
|
||||
|
Reference in New Issue
Block a user