From 7b765db827f47c66fbcd6a130a9efafd388874d7 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Thu, 15 Dec 2022 10:04:00 +0100 Subject: [PATCH] Add `currentPlayer` property to `Game` class --- src/js/Game.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/js/Game.js b/src/js/Game.js index 9dbbd38..71a5e2c 100644 --- a/src/js/Game.js +++ b/src/js/Game.js @@ -79,6 +79,14 @@ export class Game return this.state.board; } + /** + * Gets the current player. + */ + get currentPlayer() + { + return this.state.currentPlayer; + } + /** * Gets the id of the player that is winning. *