summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-06-23 11:51:34 +0200
committerTor Andersson <tor@ccxvii.net>2022-11-16 19:19:38 +0100
commitd635b51c956a545152bc61f166b070051cb72fde (patch)
tree7449d3775cbdbfdb02b7d4bd9c5520eaac679135
parent6f46003f37491ca670ba72119bf334e8699ccadf (diff)
downloadcrusader-rex-d635b51c956a545152bc61f166b070051cb72fde.tar.gz
crusader: Group blocks by owner, not visibility.
-rw-r--r--play.html2
-rw-r--r--ui.js6
2 files changed, 5 insertions, 3 deletions
diff --git a/play.html b/play.html
index 8aa3a6c..941ce7f 100644
--- a/play.html
+++ b/play.html
@@ -19,7 +19,7 @@
.grid_log { background-color: ghostwhite; }
.grid_top { background-color: gainsboro; }
.grid_top.your_turn { background-color: orange; }
-.grid_top.Franks.your_turn { background-color: gold; }
+.grid_top.Franks.your_turn { background-color: #f7de46; /* 50% mix of khaki and gold */ }
.grid_top.Saracens.your_turn { background-color: lightgreen; }
.grid_top.disconnected { background-color: red; }
.role_info { background-color: silver; }
diff --git a/ui.js b/ui.js
index 8c28bc4..6502cea 100644
--- a/ui.js
+++ b/ui.js
@@ -572,12 +572,14 @@ function update_map() {
if ((town == S_POOL || town == F_POOL) && b != game.who)
known = "";
element.classList = info.owner + known + " block" + image + steps + moved;
- layout[town].south.push(element);
} else {
let besieging = (game.sieges[town] == info.owner) ? " besieging" : "";
element.classList = info.owner + " block" + moved + besieging;
- layout[town].north.push(element);
}
+ if (info.owner == FRANKS)
+ layout[town].north.push(element);
+ else
+ layout[town].south.push(element);
show_block(element);
} else {
hide_block(element);