From 3ac6f7601b305cba57f89ebb1d1989d3ea4c118c Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 5 Jul 2021 13:06:14 +0200 Subject: caesar: Eqeqeq. --- data.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'data.js') diff --git a/data.js b/data.js index c19a2ae..137ad39 100644 --- a/data.js +++ b/data.js @@ -2,8 +2,6 @@ const CAESAR = "Caesar"; const POMPEIUS = "Pompeius"; -const CLEOPATRA = "Cleopatra"; -const BOTH = "Both"; const CARDS = { 1: { name: "Apollo", event: "Apollo", image: "apollo" }, @@ -120,13 +118,13 @@ const SPACES = { }; (function () { - function space(axis, major, minor, wrap, name, type, value) { + function space(axis, major_align, minor_align, wrap, name, type, value) { SPACES[name].type = type; SPACES[name].value = value | 0; SPACES[name].exits = []; SPACES[name].layout_axis = axis; - SPACES[name].layout_major = (1 - major) / 2; - SPACES[name].layout_minor = (1 - minor) / 2; + SPACES[name].layout_major = (1 - major_align) / 2; + SPACES[name].layout_minor = (1 - minor_align) / 2; SPACES[name].wrap = wrap; } @@ -397,13 +395,13 @@ const SPACES = { function block(owner, CR, steps, type, name, levy) { let id = name; let [initiative, firepower] = CR; - if (type != 'leader' && type != 'cleopatra' && type != 'legio') + if (type !== 'leader' && type !== 'cleopatra' && type !== 'legio') id = owner[0] + " " + id; let descr = name; - if (type != 'leader' && type != 'cleopatra' && type != 'legio') + if (type !== 'leader' && type !== 'cleopatra' && type !== 'legio') descr = owner[0] + ". " + descr; if (levy) { - if (levy == "Carthago Nova") + if (levy === "Carthago Nova") descr += " (C. Nova)"; else descr += " (" + levy + ")"; @@ -503,5 +501,5 @@ const SPACES = { pompeius("D2", 2, "navis", "Navis 5"); })(); -if (typeof module != 'undefined') +if (typeof module !== 'undefined') module.exports = { CARDS, BLOCKS, SPACES, EDGES } -- cgit v1.2.3