From 495090873cf62a1ca698cee18a2d292fc30aa292 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 27 May 2023 19:28:16 +0200 Subject: Stuff. --- tools/genpieces.js | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 tools/genpieces.js (limited to 'tools/genpieces.js') diff --git a/tools/genpieces.js b/tools/genpieces.js new file mode 100644 index 0000000..01d7edb --- /dev/null +++ b/tools/genpieces.js @@ -0,0 +1,33 @@ +var ix = 0 + +function mk(name, n) { + var a = ix + var b = ix + n - 1 + console.log("const " + name + "_data = " + a) + ix = b + 1 +} + +function size(name) { + console.log("const " + name + "_size = " + (ix)) +} + +mk("province", 12) +mk("legion", 33) +mk("rival_emperor", 3) +mk("barbarian_leader", 3) +mk("alamanni", 10) +mk("franks", 10) +mk("goths", 10) +mk("red_governor", 6) +mk("red_general", 6) +mk("blue_governor", 6) +mk("blue_general", 6) +size("data_2p") +mk("nomads", 10) +mk("yellow_governor", 6) +mk("yellow_general", 6) +size("data_3p") +mk("sassanids", 10) +mk("green_governor", 6) +mk("green_general", 6) +size("data_4p") -- cgit v1.2.3