summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-06-25 17:41:05 +0200
committerTor Andersson <tor@ccxvii.net>2023-02-18 12:12:42 +0100
commit3daf6c4722e130a5158a1e60493e3f70ab4e6a0d (patch)
treef496ae73cb0110150d748a7820913b234189cce5
parentda87b88838d72c1c2592e9cb5b7b578b15583db5 (diff)
downloadshores-of-tripoli-3daf6c4722e130a5158a1e60493e3f70ab4e6a0d.tar.gz
New and improved join page with server sent events.
-rw-r--r--rules.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/rules.js b/rules.js
index 56d4411..1e88747 100644
--- a/rules.js
+++ b/rules.js
@@ -2757,9 +2757,11 @@ states.game_over = {
// SETUP
+exports.ready = function (scenario, players) {
+ return players.length === 2;
+}
+
exports.setup = function (scenario, players) {
- if (players.length != 2)
- throw new Error("Invalid player count: " + players.length);
game = {
state: null,
year: 1801,