summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
Diffstat (limited to 'play.js')
-rw-r--r--play.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/play.js b/play.js
index af717c9..95112eb 100644
--- a/play.js
+++ b/play.js
@@ -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, "&amp;")
text = text.replace(/</g, "&lt;")
text = text.replace(/>/g, "&gt;")
- 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)