From 73616b835394b357d5cc9ed1a2219249862462f9 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 6 Jun 2024 14:19:09 +0200 Subject: eslint and other cleanups --- play.js | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) (limited to 'play.js') diff --git a/play.js b/play.js index 9f7e449..7eb5c21 100644 --- a/play.js +++ b/play.js @@ -564,8 +564,8 @@ const ui = { document.getElementById("hand_france"), ], cities: [], - action_register: [], roads: [], + action_register: [], } function register_action(target, action, id) { @@ -1091,9 +1091,6 @@ function colorize(text) { text = text.replaceAll("\u2663", colorize_C) text = text.replaceAll("\u2665", colorize_H) text = text.replaceAll("\u2666", colorize_D) - -/* - */ return text } @@ -1133,7 +1130,7 @@ function player_from_power(pow) { return role } -function update_player_power_list(role, powers) { +function update_player_power_list(role) { if (roles[role]) { roles[role].stat.replaceChildren() for (let pow of all_powers) @@ -1148,7 +1145,7 @@ function update_player_active(name) { } function on_prompt(text) { - return colorize(view.prompt) + return colorize(text) } function on_update() { @@ -1433,22 +1430,6 @@ function sub_path(pieces_and_spaces) { return `${ps_name} to ${ss_name}.` } -const suit_icon = [ - '\u2660', - '\u2663', - '\u2665', - '\u2666', - 'R', -] - -function sub_tc(_match, p1) { - let c = p1 | 0 - let d = to_deck(c) - let v = to_value(c) - let s = to_suit(c) - return `${v}${suit_icon[s]}` -} - const strokes_of_fate_name = [ "Poems", "Lord Bute", @@ -1485,7 +1466,6 @@ function on_log(text) { text = colorize(text) text = text.replace(/S(\d+)/g, sub_space) text = text.replace(/P(\d+)/g, sub_piece) - text = text.replace(/C(\d+)/g, sub_tc) if (text.startsWith("@")) { p.className = "move_tip" -- cgit v1.2.3