summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-06-25 17:41:05 +0200
committerTor Andersson <tor@ccxvii.net>2022-11-17 12:53:17 +0100
commit2fe3301ee70a7eedaa45f4ba5a9578e31c8e279f (patch)
tree89d5bb5105656c2e6a951cf3be2411dbb2d1c16d /rules.js
parente7209785dae10f912434881ee75ee433b8b1f98b (diff)
downloadhammer-of-the-scots-2fe3301ee70a7eedaa45f4ba5a9578e31c8e279f.tar.gz
New and improved join page with server sent events.
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/rules.js b/rules.js
index 6039fb6..8a09f67 100644
--- a/rules.js
+++ b/rules.js
@@ -2797,9 +2797,11 @@ function make_battle_view() {
return battle;
}
+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 = {
attacker: {},
border_limit: {},