summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortslil clingman <>2021-10-05 22:08:38 -0400
committertslil clingman <>2021-10-05 22:08:38 -0400
commit7c4657c41c603307a7d6cf1293294f34eceea24f (patch)
tree8ae10f1c89ed4d818c2cfc16a1f124158f31752b
parent7bbb833c557380bbd398737f655e04a55960a5aa (diff)
Ready for CGI tak on Gemini!
Probably bugs & security holes O.o
-rwxr-xr-xct198617
-rw-r--r--tak.gmi16
2 files changed, 33 insertions, 0 deletions
diff --git a/ct1986 b/ct1986
new file mode 100755
index 0000000..047999b
--- /dev/null
+++ b/ct1986
@@ -0,0 +1,17 @@
+#!/bin/bash
+META="text/gemini; charset=utf-8"
+
+if [ -n "${QUERY_STRING}" ]; then
+ new_ptn="${PATH_INFO//\//}${QUERY_STRING}."
+ printf '20 %s\r\n' "$META"
+ printf '```\n'
+ while [ "$(pgrep geminict | wc -l)" > "10" ]; do
+ sleep 0.25s;
+ done
+ geminict "$new_ptn"
+ printf '```\n'
+ echo 'Please be patient, ct1986 is a slow bot and no more than 10 instances are allowed concurrently on the server.'
+ printf "=> gemini://l-3.space/ct1986/$new_ptn/ Enter next move"
+else
+ printf "10 Enter starting move:\r\n"
+fi;
diff --git a/tak.gmi b/tak.gmi
new file mode 100644
index 0000000..030d1a1
--- /dev/null
+++ b/tak.gmi
@@ -0,0 +1,16 @@
+# Tak
+
+Welcome to Gemini Tak. Here you can play against my rather slow, rather unskilled Tak bot on the 5x5 grid size. The game board, state, and log are displayed each turn. To make a play, enter your desired action in PTN.
+
+=> http://cheapass.com/wp-content/uploads/2016/07/Tak-Beta-Rules.pdf Tak rules
+=> https://ustak.org/portable-tak-notation/ PTN explained
+
+The interface presently makes use of the following unicode characters, listed as ``(black) & (white)'':
+
+* ⛀ & ⛂ represent top-of-stack flats
+* ⫾ & ❚ represent top-of-stack walls
+* ♕ & ♛ represent capstones
+* ▭ & ▬ represent in-stack flats
+* ▿ & ▾ represent in-stack flats that are below the carrying capacity
+
+=> gemini://l-3.space/ct1986/ Begin!