summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
Diffstat (limited to 'play.js')
-rw-r--r--play.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/play.js b/play.js
index 3d0782f..3559f92 100644
--- a/play.js
+++ b/play.js
@@ -87,6 +87,7 @@ let ui = {
barbarian_leaders: [],
rival_emperors: [],
body: document.querySelector("body"),
+ header: document.querySelector("header"),
available_generals: document.getElementById("available_generals"),
available_governors: document.getElementById("available_governors"),
hand: document.getElementById("hand"),
@@ -416,8 +417,15 @@ function layout_stack(id, list, region, in_capital) {
function on_update() {
stack_cache = {}
+ ui.body.classList.toggle("p1", view.solo === 1)
ui.body.classList.toggle("p2", view.players.length === 2)
ui.body.classList.toggle("p3", view.players.length === 3)
+ ui.body.classList.toggle("p4", view.players.length === 4)
+
+ ui.header.classList.toggle("player_red", view.current === 0)
+ ui.header.classList.toggle("player_blue", view.current === 1)
+ ui.header.classList.toggle("player_yellow", view.current === 2)
+ ui.header.classList.toggle("player_green", view.current === 3)
if (view.players.length < 4)
hide(document.getElementById("role_Green"))
@@ -670,6 +678,11 @@ function on_update() {
for (let e of action_register)
e.classList.toggle("action", is_action(e.my_action, e.my_id))
+
+ action_button("end_actions", "End Actions")
+
+ action_button("done", "Done")
+ action_button("undo", "Undo")
}
on_init()