From de6aa57e459982d9093ab835557e1e40ef00ffb0 Mon Sep 17 00:00:00 2001 From: tim Date: Thu, 2 Dec 2021 03:23:29 +0100 Subject: [PATCH] Remove logs and fix startDicePerPlayer --- src/components/GameRulesEditor.vue | 6 +++--- src/views/Home.vue | 8 ++------ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/components/GameRulesEditor.vue b/src/components/GameRulesEditor.vue index d84f3f9..1b1105e 100644 --- a/src/components/GameRulesEditor.vue +++ b/src/components/GameRulesEditor.vue @@ -39,12 +39,12 @@ export default class GameRulesEditor extends Vue { @Prop() private value!: GameRules; @Prop() private readonly!: boolean; - private get startDicePerPlayer (): number { + private get startDicePerPlayer (): number|string { return this.value.startDicePerPlayer; } - private set startDicePerPlayer (b: number) { - this.value.startDicePerPlayer = b; + private set startDicePerPlayer (b: number|string) { + this.value.startDicePerPlayer = parseInt(b.toString()); this.emitRules(); } diff --git a/src/views/Home.vue b/src/views/Home.vue index de5b078..e96f8b4 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -204,7 +204,6 @@ export default class Home extends Vue { } private set rules (gameRules: GameRules | undefined) { - console.log(gameRules); if (this.playerId && gameRules) { PerudoApi.instance.setGameRules(this.playerId, gameRules); } @@ -296,11 +295,10 @@ export default class Home extends Vue { } private checkStarted (): void { - console.log("Check started"); + // console.log("Check started"); if (this.gameJoined && this.playerId) { PerudoApi.instance.gameStarted(this.playerId).then((response: IsStartedObject) => { this.gameStateObject = response.gameState; - console.log(this.gameStateObject.rules); if (response.started) { this.gameState = GameState.Started; @@ -316,7 +314,7 @@ export default class Home extends Vue { } private checkTurn (): void { - console.log("Check turn"); + // console.log("Check turn"); if (this.gameStarted && this.playerId) { PerudoApi.instance.myTurn(this.playerId).then((response: MyTurnObject) => { this.gameStateObject = response.gameState; @@ -329,8 +327,6 @@ export default class Home extends Vue { this.diceCount = this.lastTurn?.diceCount.toString() ?? this.diceCount; this.dieValue = this.lastTurn?.dieValue ?? this.dieValue; this.clearGameTimer(); - - console.log(this.gameStateObject); } }); }