diff options
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -1,7 +1,6 @@ "use strict" -// TODO: layout cubes in spaces in two groups (max 4 each space) -// TODO: layout cubes on tracks/pools as one space +// TODO: show red out of play cubes on board let layout = [] let space_layout_cube = [] @@ -333,6 +332,12 @@ function sub_card_name(match, p1, offset, string) { return `<span class="tip" onmouseenter="on_focus_card_tip(${c})" onmouseleave="on_blur_card_tip()">${n}</span>` } +function sub_space_name(match, p1, offset, string) { + let c = p1 | 0 + let n = space_names[c] + return n +} + function on_log(text) { let p = document.createElement("div") @@ -344,7 +349,8 @@ function on_log(text) { text = text.replace(/&/g, "&") text = text.replace(/</g, "<") text = text.replace(/>/g, ">") - text = text.replace(/#(\d+)/g, sub_card_name) + text = text.replace(/C(\d+)/g, sub_card_name) + text = text.replace(/S(\d+)/g, sub_space_name) if (text.match(/^\.h1/)) { text = text.substring(4) |