summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorteisuru <31881306+teisuru@users.noreply.github.com>2023-08-23 15:22:27 +0200
committerTor Andersson <tor@ccxvii.net>2023-12-10 18:16:55 +0100
commit71b35aab731eea9999a4b4081172ee9f274ebd9f (patch)
treea1774643cc7c359ebbf1450047e456ea93a2d009 /play.js
parent00ae6d53325fdbe0cd42c0e1b6a0bafc9633a242 (diff)
downloadplantagenet-71b35aab731eea9999a4b4081172ee9f274ebd9f.tar.gz
favour and deplete init
Diffstat (limited to 'play.js')
-rw-r--r--play.js44
1 files changed, 39 insertions, 5 deletions
diff --git a/play.js b/play.js
index 0d66eb5..6dc77f0 100644
--- a/play.js
+++ b/play.js
@@ -664,6 +664,8 @@ function build_map() {
let xc = Math.round(x + w / 2)
let yc = Math.round(y + h / 2)
let e
+ let small = 40
+ let offsetdeplete = 10
locale_xy[ix] = [ xc, yc ]
@@ -680,15 +682,47 @@ function build_map() {
// Locale Markers
e = ui.locale_markers[ix] = document.createElement("div")
- e.className = "locale rose favour " + locale.name
- e.style.top = y + "px"
- e.style.left = x + "px"
- e.style.width = w + "px"
- e.style.height = h + "px"
+ e.className = "locale marker york rose favour " + locale.name // York to be removed - York/Lancaster
+ e.style.top = y+h-small + "px"
+ e.style.left = x+ (w-small)/2 + "px"
+ e.style.width = small + "px"
+ e.style.height = small + "px"
+ e.style.border = "2px solid aqua" // to be changed depending on the favour marker
+ e.style.backgroundSize = small + "px"
+ document.getElementById("pieces").appendChild(e)
+
+ e = ui.locale_markers[ix] = document.createElement("div")
+ e.className = "locale marker depleted " + locale.name // Depleted to be removed - depleted/exhausted to add markers
+ e.style.top = y+h-small-offsetdeplete + "px"
+ e.style.left = offsetdeplete+x+ (w-small)/2 + "px"
+ e.style.width = small + "px"
+ e.style.height = small + "px"
e.style.border = "2px solid aqua"
+ e.style.backgroundSize = small + "px"
document.getElementById("pieces").appendChild(e)
+
+
+ /*
+ if (locale.name == London) {
+ if {data.lords ==
+ e = ui.locale_markers[ix] = document.createElement("div")
+ e.className = "locale marker seat " + locale.name // Depleted to be removed - depleted/exhausted to add markers
+ e.style.top = y+h-small-offsetdeplete + "px"
+ e.style.left = offsetdeplete+x+ (w-small)/2 + "px"
+ e.style.width = small + "px"
+ e.style.height = small + "px"
+ e.style.border = "2px solid aqua"
+ e.style.backgroundSize = small + "px"
+ document.getElementById("pieces").appendChild(e)
+ } */
})
+
+
+
+
+
+
data.lords.forEach((lord, ix) => {
let e = ui.lord_cylinder[ix] = document.createElement("div")
let side = lord.side.toLowerCase()