diff options
Diffstat (limited to 'draughts/public/javascripts/game.js')
-rw-r--r-- | draughts/public/javascripts/game.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/draughts/public/javascripts/game.js b/draughts/public/javascripts/game.js index 20cceb8..dd0e9a2 100644 --- a/draughts/public/javascripts/game.js +++ b/draughts/public/javascripts/game.js @@ -167,6 +167,12 @@ ws.addEventListener("message", ({ data }) => { gameHistory = data.body.history drawHistory() break + case Messages.START: + alert("The opponent has joined, you can make your first move.") + break + case Messages.GAMEOVER: + alert(data.body == colorPrefix ? "Congratulations, you have won!" + : "Unfortunately, you have lost...") break } }) |