From 1d68089d06393f6edfa776261b43b3dcc46d95eb Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 28 May 2022 12:45:14 +0200 Subject: Set active player to "None" when game is over. --- play.html | 2 +- play.js | 2 +- rules.js | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/play.html b/play.html index b3cfddd..11613a8 100644 --- a/play.html +++ b/play.html @@ -53,7 +53,7 @@
-
Gray +
Gray
15
diff --git a/play.js b/play.js index 7d6a391..485d318 100644 --- a/play.js +++ b/play.js @@ -2,7 +2,7 @@ // CONSTANTS -const player_names = [ "Gray", "Blue", "Tan", "Red", "Black" ]; +const player_names = [ "Gray", "Blue", "Tan", "Red", "Black", "None" ]; const player_index = Object.fromEntries(Object.entries(player_names).map(([k,v])=>[v,k|0])); const Persia = 201; diff --git a/rules.js b/rules.js index 64e035e..71f2b8f 100644 --- a/rules.js +++ b/rules.js @@ -46,6 +46,7 @@ const player_names = [ "Tan", "Red", "Black", + "None" ]; const player_index = Object.fromEntries(Object.entries(player_names).map(([k,v])=>[v,k|0])); @@ -2978,6 +2979,7 @@ function goto_pause_game_over() { function goto_game_over() { compute_victory(); game.state = 'game_over'; + game.active = 5; } states.pause_game_over = { @@ -2988,6 +2990,7 @@ states.pause_game_over = { }, end_game() { game.state = 'game_over'; + game.active = 5; } } -- cgit v1.2.3