summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-07-19 12:25:47 +0200
committerTor Andersson <tor@ccxvii.net>2022-11-17 13:11:25 +0100
commit710bc4a5242b47a17a9fdcc34323587c38cfb09b (patch)
tree6875747a00f60d6fbc2d00652af287f130522b80 /play.js
parent459586dfb04f3b79a4180e84e3603f5bffaf2abc (diff)
downloadrommel-in-the-desert-710bc4a5242b47a17a9fdcc34323587c38cfb09b.tar.gz
No rommel in 1940
Diffstat (limited to 'play.js')
-rw-r--r--play.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/play.js b/play.js
index 1408a0a..89a5413 100644
--- a/play.js
+++ b/play.js
@@ -16,6 +16,8 @@ const ANTITANK = 2
const ARTILLERY = 3
function set_has(set, item) {
+ if (!set)
+ return false
let a = 0
let b = set.length - 1
while (a <= b) {