From 3820856482017e0f206b0481856a86a2b4fc589c Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 24 Aug 2024 01:17:17 +0200 Subject: Start client. --- rules.js | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 72 insertions(+), 3 deletions(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index 9c795a7..4cb186c 100644 --- a/rules.js +++ b/rules.js @@ -6,13 +6,71 @@ let view = null /* DATA */ -const data = require("./data.js") +// const data = require("./data.js") + +const space_name = [ + "Andhra", + "Bengal", + "Gondwana", + "Gujarat", + "Jaunpur", + "Karnataka", + "Madhyadesh", + "Maharashtra", + "Malwa", + "Orissa", + "Rajput Kingdoms", + "Sindh", + "Tamilakam", + "Delhi", + "Mountain Passes", + "Punjab", + "Mongol Invaders", + "DS Available", + "BK Available", + "VE Available", +] + +const S_ANDHRA = 0 +const S_BENGAL = 1 +const S_GONDWANA = 2 +const S_GUJARAT = 3 +const S_JAUNPUR = 4 +const S_KARNATAKA = 5 +const S_MADHYADESH = 6 +const S_MAHARASHTRA = 7 +const S_MALWA = 8 +const S_ORISSA = 9 +const S_RAJPUT_KINGDOMS = 10 +const S_SINDH = 11 +const S_TAMILAKAM = 12 +const S_DELHI = 13 +const S_MOUNTAIN_PASSES = 14 +const S_PUNJAB = 15 +const S_MONGOL_INVADERS = 16 +const S_DS_AVAILABLE = 17 +const S_BK_AVAILABLE = 18 +const S_VE_AVAILABLE = 19 +const S_BK_INF_2 = 20 +const S_BK_INF_4 = 21 +const S_VE_INF_1 = 22 +const S_VE_INF_2 = 23 +const S_VE_INF_3 = 24 +const S_VE_INF_4 = 25 // Factions const DS = 0 const BK = 1 const VE = 2 +// Sequence of Play options +const ELIGIBLE = 0 +const SOP_LIMITED_COMMAND = 1 +const SOP_COMMAND_DECREE = 2 +const SOP_EVENT_OR_COMMAND = 3 +const SOP_PASS = 4 +const INELIGIBLE = 5 + const faction_name = [ "Delhi Sultanate", "Bahmani Kingdom", "Vijayanagara Empire" ] // Role names @@ -66,7 +124,11 @@ exports.view = function (state, role) { actions: null, log: game.log, current: game.current, - deck: [ this_card, deck_size ], + vp: [ 18, 0, 0 ], + resources: [ 12, 6, 7 ], + bk_inf: 0, + ve_inf: 0, + deck: [ this_card, deck_size, game.of_gods_and_kings ], } if (game.result) { @@ -149,7 +211,14 @@ exports.setup = function (seed, scenario, _options) { current: 0, state: null, - // TODO: control, pieces, and tracks + cylinder: [ ELIGIBLE, ELIGIBLE, ELIGIBLE ], + resources: [ 12, 6, 7 ], + bk_inf: 0, + ve_inf: 0, + tributary: 8191, // all 13 provinces + rebel: 0, // amir/raja rebel status + pieces: [], // piece locations + deck: [], } -- cgit v1.2.3