Fix bug were owner would nog check turn

This commit is contained in:
Tim 2021-07-12 02:43:11 +02:00
parent fe69ec62ab
commit 698849c49d

View File

@ -27,13 +27,14 @@
</template>
<template v-if="gameStarted">
The game has started, lets go!
The game has started, lets go! <br>
</template>
<template v-if="myTurn">
It is your turn! <br>
Round: {{ currentRound.number }} <br>
Turn: {{ currentTurn ? currentTurn.number : -1 }}
Round: {{ currentRound.number + 1 }} <br>
Turn: {{ currentTurn ? currentTurn.number : 1 }} <br>
Throws: {{ currentRound.myRolls }}
</template>
</div>
</template>
@ -120,6 +121,9 @@ export default class Home extends Vue {
if (this.gameJoined && this.playerId) {
PerudoApi.instance.startGame(this.playerId).then((response: ApiObject) => {
this.gameState = GameState.Started;
this.gameTimer = setInterval(() => {
this.checkTurn();
}, 1000);
}).catch((reason => {
this.error = reason;
}));