summaryrefslogtreecommitdiff
path: root/test-client/tiles.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test-client/tiles.ts')
-rw-r--r--test-client/tiles.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/test-client/tiles.ts b/test-client/tiles.ts
index 86203cb7..d890212f 100644
--- a/test-client/tiles.ts
+++ b/test-client/tiles.ts
@@ -83,6 +83,20 @@ function cross(size: number, stroke: string, stroke_width = 0.05): Component {
c.stroke()
}
}
+function text(s: string): Component {
+ return c => {
+ c.font = "0.8px sans-serif"
+ c.strokeStyle = "#e38242"
+ c.fillStyle = "white"
+ c.lineWidth = 0.05
+ c.textAlign = "center"
+ c.textBaseline = "middle"
+ c.lineJoin = "round"
+ c.lineCap = "round"
+ c.strokeText(s, 0, 0)
+ c.fillText(s, 0, 0)
+ }
+}
function arrange_items(...items: ItemName[]): Component {
return c => {
@@ -150,6 +164,7 @@ const ITEMS: { [key in ItemName]: (c: string[]) => Component } = {
"dirty-plate": () => circle(0.4, "#947a6f", "#d3a187", 0.02),
"mochi-dough": () => circle(0.3, "rgb(172, 162, 151)"),
"rice-flour": () => iref("rice"),
+ "unknown-order": () => text("!"),
"pan": i => c => (circle(0.35, "rgb(29, 29, 29)", "rgb(39, 39, 39)", 0.04)(c), arrange_items(...i)(c)),
"pot": i => c => (circle(0.27, "rgb(29, 29, 29)", "rgb(56, 56, 56)", 0.2)(c), arrange_items(...i)(c)),