From 24a1e303b84fad2a4c60c037109943025912999e Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 27 Nov 2024 23:55:30 +0100 Subject: separate subsidy and returned card arrays and prompts --- play.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'play.js') diff --git a/play.js b/play.js index 28b71da..f8dc393 100644 --- a/play.js +++ b/play.js @@ -833,6 +833,8 @@ function on_init() { ui.tcbreak1.className = "draw-break" ui.tcbreak2 = document.createElement("div") ui.tcbreak2.className = "draw-break" + ui.tcbreak3 = document.createElement("div") + ui.tcbreak3.className = "draw-break" ui.turn = document.createElement("div") ui.turn.className = "marker turn_marker" @@ -1501,11 +1503,16 @@ function on_update() { for (let c of view.hand2[pow].slice().sort(cmp_tc)) ui.hand[pow].appendChild(show_tc(c)) } + if (view.hand3[pow].length > 0) { + ui.hand[pow].appendChild(ui.tcbreak2) + for (let c of view.hand3[pow].slice().sort(cmp_tc)) + ui.hand[pow].appendChild(show_tc(c)) + } } if (view.draw) { if (view.hand1[view.power].length + view.hand2[view.power].length > 0) - ui.hand[view.power].appendChild(ui.tcbreak2) + ui.hand[view.power].appendChild(ui.tcbreak3) for (let c of view.draw.slice().sort(cmp_tc)) ui.hand[view.power].appendChild(ui.tc[c]) } -- cgit v1.2.3