summaryrefslogtreecommitdiff
path: root/tictactoe
diff options
context:
space:
mode:
Diffstat (limited to 'tictactoe')
-rw-r--r--tictactoe/board18
-rwxr-xr-xtictactoe/game.sh29
-rwxr-xr-xtictactoe/listen.sh19
-rw-r--r--tictactoe/marker02
-rw-r--r--tictactoe/marker11
-rwxr-xr-xtictactoe/run6
6 files changed, 0 insertions, 75 deletions
diff --git a/tictactoe/board b/tictactoe/board
deleted file mode 100644
index d4b8f56..0000000
--- a/tictactoe/board
+++ /dev/null
@@ -1,18 +0,0 @@
-junk set global.zoom 64
-junk set camera.p.z -7
-junk set camera.p.y -1
-junk set camera.p.x 0
-
-_reset addshape 2 3 -4 -4 4 -5 -4 4 -4 -5 4
-
-topleft addshape 2 4 -3 3 4 -1 3 4 -1 1 4 -3 1 4
-topcenter addshape 2 4 -1 3 4 1 3 4 1 1 4 -1 1 4
-topright addshape 2 4 1 3 4 3 3 4 3 1 4 1 1 4
-
-middleleft addshape 2 4 -3 1 4 -1 1 4 -1 -1 4 -3 -1 4
-middlecenter addshape 2 4 -1 1 4 1 1 4 1 -1 4 -1 -1 4
-middleright addshape 2 4 1 1 4 3 1 4 3 -1 4 1 -1 4
-
-bottomleft addshape 2 4 -3 -1 4 -1 -1 4 -1 -3 4 -3 -3 4
-bottomcenter addshape 2 4 -1 -1 4 1 -1 4 1 -3 4 -1 -3 4
-bottomright addshape 2 4 1 -1 4 3 -1 4 3 -3 4 1 -3 4
diff --git a/tictactoe/game.sh b/tictactoe/game.sh
deleted file mode 100755
index 1d3737c..0000000
--- a/tictactoe/game.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/bash
-turn=$( expr $RANDOM % 2)
-echo "go. player: $turn"
-stdbuf -oL uniq \
- | grep --line-buffered action \
- | stdbuf -oL cut '-d ' -f1,3 | while read user group;do
- if grep "_reset" <<<$group >/dev/null;then
- printf "%s deleteallexcept .\n" "$user"
- cat board
- continue
- elif grep "_" <<<$group >/dev/null;then
-# xmessage "CUT IT OUT"
- echo CUT IT OUT > /dev/stderr
- continue
- else
- turn=$(expr \( $turn + 1 \) % 2)
- #printf "# turn: %d\n" "$turn" > /dev/stderr
- printf "$user deletegroup %s\n" "$group"
- #printf "$user deletegroup %s\n" "$group" > /dev/stderr
-#need to get the first point of the group clicked and translate the new shape by that much
- translatex="$(grep "$group" board | grep -v '^#' | tr -s ' ' | cut '-d ' -f5)"
- translatey="$(grep "$group" board | grep -v '^#' | tr -s ' ' | cut '-d ' -f6)"
- cat "marker$turn"
- printf "%s move %s %s 2\n" "_marker" "$(expr "$translatex")" "$(expr "$translatey" - 2 )"
- #printf "%s move %s %s 2\n" "_marker" "$(expr "$translatex")" "$(expr "$translatey" - 2 )" >/dev/stderr
- grep "$group" board | sed "s/$group/_marker2/g" #this is to make it still show the square around it.
- printf "%s renamegroup _marker _marker%s%s\n" "$user" "$(date +%s)" "$RANDOM"
- fi
- done
diff --git a/tictactoe/listen.sh b/tictactoe/listen.sh
deleted file mode 100755
index 0318cd2..0000000
--- a/tictactoe/listen.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-#mabe not. might be buggier.
-#cat board p1out | ncat -lp 1050 > p1in &
-#cat board p2out | ncat -lp 1051 > p2in &
-echo listening in port 1050 for player 1 and 1051 for player 2
-
-mknod pin p
-mknod p1out p
-mknod p2out p
-
-cat board p1out | ncat -lp 1050 > pin &
-cat board p2out | ncat -lp 1051 > pin &
-
-cat pin | ./game.sh | tee p1out p2out
-
-rm pin
-rm p1out
-rm p2out
diff --git a/tictactoe/marker0 b/tictactoe/marker0
deleted file mode 100644
index 5bc0c5c..0000000
--- a/tictactoe/marker0
+++ /dev/null
@@ -1,2 +0,0 @@
-_marker addshape 1 2 .5 .5 2 1.5 1.5 2
-_marker addshape 1 2 1.5 .5 2 .5 1.5 2
diff --git a/tictactoe/marker1 b/tictactoe/marker1
deleted file mode 100644
index e7aa5a7..0000000
--- a/tictactoe/marker1
+++ /dev/null
@@ -1 +0,0 @@
-_marker addshape 3 4 1.5 1.5 2 .5 1.5 2 .5 .5 2 1.5 .5 2
diff --git a/tictactoe/run b/tictactoe/run
deleted file mode 100755
index 8dddc99..0000000
--- a/tictactoe/run
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-turn=$( expr $RANDOM % 2)
-echo "go. player: $turn"
-mknod p p
-stdbuf -oL cat board p | hackvr "$USER" | ./game.sh > p
-rm p