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