From 456d08d10840405e34f20af321e1802bcf156c53 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 23 Oct 2024 12:08:47 +0200 Subject: 25 optional political rule --- play.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'play.js') diff --git a/play.js b/play.js index e58e027..beb62e1 100644 --- a/play.js +++ b/play.js @@ -1003,10 +1003,10 @@ const colorize_3 = '$1' const colorize_4 = '$1' function colorize(text) { - text = text.replace(/1\^(\d+)/g, colorize_1) - text = text.replace(/2\^(\d+)/g, colorize_2) - text = text.replace(/3\^(\d+)/g, colorize_3) - text = text.replace(/4\^(\d+)/g, colorize_4) + text = text.replace(/1\^(\d+[\u2660\u2663\u2665\u2666R])/g, colorize_1) + text = text.replace(/2\^(\d+[\u2660\u2663\u2665\u2666R])/g, colorize_2) + text = text.replace(/3\^(\d+[\u2660\u2663\u2665\u2666R])/g, colorize_3) + text = text.replace(/4\^(\d+[\u2660\u2663\u2665\u2666R])/g, colorize_4) text = text.replace(/(\d+)R/g, colorize_R) text = text.replaceAll("\u2660", colorize_S) text = text.replaceAll("\u2663", colorize_C) @@ -1099,10 +1099,10 @@ function on_update() { for (let pow of all_major_powers) { ui.pc_placed[pow].replaceChildren() - for (let tc of view.saved[pow]) + for (let tc of view.face_up[pow]) + ui.pc_placed[pow].appendChild(show_tc(tc)) + for (let tc of view.face_down[pow]) ui.pc_placed[pow].appendChild(show_tc(tc)) - if (view.placed && view.placed[pow] >= 0) - ui.pc_placed[pow].appendChild(show_tc(view.placed[pow])) } ui.pc_show.replaceChildren() -- cgit v1.2.3