From 3de12fe760ce99a27ed0dcdb87308c0bb4d04522 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 13 May 2023 22:12:08 +0200 Subject: Lots of logging! --- play.js | 40 +++++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) (limited to 'play.js') diff --git a/play.js b/play.js index 2e61505..e2bf241 100644 --- a/play.js +++ b/play.js @@ -343,6 +343,37 @@ function sub_card_name(match, p1, offset, string) { function sub_space_name(match, p1, offset, string) { let c = p1 | 0 let n = space_names[c] + if (true) { + if (c <= 2) + return '' + n + "" + if (c <= 5) + return '' + n + "" + if (c <= 8) + return '' + n + "" + if (c <= 11) + return '' + n + "" + } + + if (true) { + if (c <= 2) + return '' + n + if (c <= 5) + return '' + n + if (c <= 8) + return '' + n + if (c <= 11) + return '' + n + } + if (true) { + if (c <= 2) + return '' + n + "" + if (c <= 5) + return '' + n + "" + if (c <= 8) + return '' + n + "" + if (c <= 11) + return '' + n + "" + } return n } @@ -352,6 +383,8 @@ const IMG_RD = '' const IMG_BD = '' const IMG_RM = '' const IMG_BM = '' +const IMG_MV = '' +const IMG_PV = '' function on_log(text) { let p = document.createElement("div") @@ -373,6 +406,8 @@ function on_log(text) { text = text.replace(/\bBD\b/g, IMG_BD) text = text.replace(/\bRM\b/g, IMG_RM) text = text.replace(/\bBM\b/g, IMG_BM) + // text = text.replace(/\bMilitary VP\b/g, IMG_MV) + // text = text.replace(/\bPolitical VP\b/g, IMG_PV) if (text.match(/^\.h1/)) { text = text.substring(4) @@ -394,11 +429,6 @@ function on_log(text) { p.className = 'h3' } - if (text.match(/^\.h4/)) { - text = text.substring(4) - p.className = 'h4' - } - if (text.match(/^.hr$/)) { p.className = "hr"; text = ""; -- cgit v1.2.3