From ae4e74ccde82388cca5e874539bb132e23fc1e92 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Sun, 21 Feb 2021 16:59:55 +0100 Subject: game outcome working for both players --- pages/game.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pages/game.tsx b/pages/game.tsx index 481d7bd..f401bfa 100644 --- a/pages/game.tsx +++ b/pages/game.tsx @@ -92,13 +92,14 @@ class VoerGame extends Component { }}> this.move(m % this.width + 1)} active={this.props.active == true && this.state.outcome == -1}/> - + } } function GameOutcomeDialog(props: { outcome: number; + player: number; visible: boolean; }) { return @@ -109,15 +110,15 @@ function GameOutcomeDialog(props: {

{ props.outcome == 0 ? "Gelijkspel" : - props.outcome == 1 ? "Verloren" : - props.outcome == 2 ? "Gewonnen" : + props.outcome == props.player ? "Verloren" : + props.outcome != props.player ? "Gewonnen" : "???" }

{ false &&

-- cgit v1.2.3