summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--play.css12
-rw-r--r--play.html4
-rw-r--r--play.js18
3 files changed, 5 insertions, 29 deletions
diff --git a/play.css b/play.css
index 4ac26a8..aaf7621 100644
--- a/play.css
+++ b/play.css
@@ -2,10 +2,6 @@ body { background-color: dimgray; }
#roles { background-color: gray; }
header { background-color: silver; }
header.your_turn { background-color: orange; }
-#role_Red .role_name { background-color: salmon; }
-#role_Blue .role_name { background-color: skyblue; }
-#role_Yellow .role_name { background-color: khaki; }
-#role_Green .role_name { background-color: darkseagreen; }
#turn_info { background-color: gainsboro; }
.role_vp { float: right; }
@@ -21,10 +17,10 @@ body.Observer #hand_panel, body.Observer #draw_panel, body.Observer #discard_pan
display: none;
}
-#role_Red .role_name { background-color: hsl(354,85%,67%) }
-#role_Blue .role_name { background-color: hsl(207,67%,78%) }
-#role_Yellow .role_name { background-color: hsl(47,100%,73%) }
-#role_Green .role_name { background-color: hsl(99,36%,60%) }
+#role_Red { background-color: hsl(354,85%,67%) }
+#role_Blue { background-color: hsl(207,67%,78%) }
+#role_Yellow { background-color: hsl(47,100%,73%) }
+#role_Green { background-color: hsl(99,36%,60%) }
body.Red .your_turn { background-color: hsl(354,85%,72%) }
body.Blue .your_turn { background-color: hsl(207,67%,83%) }
diff --git a/play.html b/play.html
index b016733..e8fe18f 100644
--- a/play.html
+++ b/play.html
@@ -36,10 +36,6 @@
<aside>
<div id="roles">
- <div class="role" id="role_Red"><div class="role_name">Red<div class="role_vp"></div><div class="role_user">-</div></div></div>
- <div class="role" id="role_Blue"><div class="role_name">Blue<div class="role_vp"></div><div class="role_user">-</div></div></div>
- <div class="role" id="role_Yellow"><div class="role_name">Yellow<div class="role_vp"></div><div class="role_user">-</div></div></div>
- <div class="role" id="role_Green"><div class="role_name">Green<div class="role_vp"></div><div class="role_user">-</div></div></div>
</div>
<div id="log"></div>
</aside>
diff --git a/play.js b/play.js
index f051aa5..f58fbe9 100644
--- a/play.js
+++ b/play.js
@@ -706,12 +706,6 @@ let ui = {
played: document.getElementById("played"),
market: document.getElementById("market"),
pieces: document.getElementById("pieces"),
- player_info: [
- document.querySelector("#role_Red .role_vp"),
- document.querySelector("#role_Blue .role_vp"),
- document.querySelector("#role_Yellow .role_vp"),
- document.querySelector("#role_Green .role_vp"),
- ],
legacy: [
document.getElementById("red_legacy"),
document.getElementById("blue_legacy"),
@@ -1110,23 +1104,13 @@ function on_update() {
let t = view.legacy[p] + " (" + view.emperor_turns[p] + ")"
if (p === view.first)
t = "\u2756 " + t
- ui.player_info[p].textContent = t
+ roles[PLAYER_NAME[p]].stat.textContent = t
}
ui.body.classList.toggle("p2", player_count === 2)
ui.body.classList.toggle("p3", player_count === 3)
ui.body.classList.toggle("p4", player_count === 4)
- if (player_count < 4)
- hide(document.getElementById("role_Green"))
- else
- show(document.getElementById("role_Green"))
-
- if (player_count < 3)
- hide(document.getElementById("role_Yellow"))
- else
- show(document.getElementById("role_Yellow"))
-
combat_width = BATTLE_MIN
for (let pi = 0; pi < player_count; ++pi) {