summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-05-25 16:50:33 +0200
committerTor Andersson <tor@ccxvii.net>2024-05-30 21:59:25 +0200
commit1e2e2ea3bb68031e7924c080e77ff26c3a5fb039 (patch)
treea08dcaae431034126991e58d41cbb365a3be385c
parente5221e217c951815a1be0a70048d4b45d8a69d7d (diff)
downloadfriedrich-1e2e2ea3bb68031e7924c080e77ff26c3a5fb039.tar.gz
rotate clock of fate with other player panels
-rw-r--r--play.html4
-rw-r--r--play.js7
2 files changed, 6 insertions, 5 deletions
diff --git a/play.html b/play.html
index 3baac42..3dc4d9a 100644
--- a/play.html
+++ b/play.html
@@ -101,14 +101,14 @@
</div>
</div>
-</div>
-
<div id="clock_of_fate_panel" class="panel">
<div id="clock_of_fate_header" class="panel_header">Clock of Fate</div>
<div id="clock_of_fate" class="panel_body">
</div>
</div>
+</div>
+
</main>
<footer id="status"></footer>
diff --git a/play.js b/play.js
index ab0edec..f2dc0a2 100644
--- a/play.js
+++ b/play.js
@@ -235,15 +235,15 @@ const fate_effect_text = [
/* PANEL ORDER */
-const panel_order = [ P_PRUSSIA, P_HANOVER, P_RUSSIA, P_SWEDEN, P_AUSTRIA, P_IMPERIAL, P_FRANCE ]
+const panel_order = [ P_PRUSSIA, P_HANOVER, P_RUSSIA, P_SWEDEN, P_AUSTRIA, P_IMPERIAL, P_FRANCE, P_FRANCE+1 ]
function sort_power_panel() {
let start = 0
if (view)
start = view.power
ui.power_panel_list.replaceChildren()
- for (let i = 0; i < 7; ++i) {
- let p = panel_order[(i + start) % 7]
+ for (let i = 0; i < 8; ++i) {
+ let p = panel_order[(i + start) % 8]
ui.power_panel_list.appendChild(ui.power_panel[p])
}
}
@@ -266,6 +266,7 @@ const ui = {
document.getElementById("hand_austria_panel"),
document.getElementById("hand_imperial_panel"),
document.getElementById("hand_france_panel"),
+ document.getElementById("clock_of_fate_panel"),
],
hand: [
document.getElementById("hand_prussia"),