summaryrefslogtreecommitdiff
path: root/ui.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui.js')
-rw-r--r--ui.js14
1 files changed, 10 insertions, 4 deletions
diff --git a/ui.js b/ui.js
index 779cbf0..7b2c336 100644
--- a/ui.js
+++ b/ui.js
@@ -489,7 +489,7 @@ function update_map() {
"\nPretender: " + block_name(game.pretender);
for (let area in AREAS)
- layout[area] = { secret: [], known: [] };
+ layout[area] = { Lancaster: [], York: [] };
// Move secret blocks to overflow queue if there are too many in a area
for (let area in AREAS) {
@@ -550,7 +550,10 @@ function update_map() {
element.classList.remove("moved");
else
element.classList.add("moved");
- layout[area].secret.push(element);
+ if (color == REBEL)
+ layout[area][game.pretender].push(element);
+ else
+ layout[area][color].push(element);
}
}
}
@@ -562,9 +565,12 @@ function update_map() {
let steps = game.known[b][1];
let moved = game.known[b][2];
let element = ui.known[b];
+ let color = BLOCKS[b].owner;
+ if (color == REBEL)
+ color = game.pretender;
show_block(element);
- layout[area].known.push(element);
+ layout[area][color].push(element);
update_steps(b, steps, element);
if (moved)
@@ -576,7 +582,7 @@ function update_map() {
// Layout blocks on map
for (let area in AREAS)
- layout_blocks(area, layout[area].secret, layout[area].known);
+ layout_blocks(area, layout[area].Lancaster, layout[area].York);
for (let where in AREAS) {
if (ui.areas[where]) {