summaryrefslogtreecommitdiff
path: root/share/hackvr/examples/tictactoe
diff options
context:
space:
mode:
authorepoch <epoch@hacking.allowed.org>2019-02-07 03:06:49 -0600
committerepoch <epoch@hacking.allowed.org>2019-02-07 03:06:49 -0600
commit978e097ebfb50d70e5e45530cdf0fecc7654c641 (patch)
tree1be2e2d03474d7d5e61f2d992271fc492fa7df89 /share/hackvr/examples/tictactoe
parent087e0973860fd97a8283ed15b56e6dba62dcdf2b (diff)
downloadhackvr-978e097ebfb50d70e5e45530cdf0fecc7654c641.tar.gz
hackvr-978e097ebfb50d70e5e45530cdf0fecc7654c641.zip
tictactoe changes likely to get overwritten
Diffstat (limited to 'share/hackvr/examples/tictactoe')
-rwxr-xr-xshare/hackvr/examples/tictactoe/game.sh2
-rwxr-xr-xshare/hackvr/examples/tictactoe/listen.sh4
-rwxr-xr-xshare/hackvr/examples/tictactoe/run2
3 files changed, 4 insertions, 4 deletions
diff --git a/share/hackvr/examples/tictactoe/game.sh b/share/hackvr/examples/tictactoe/game.sh
index 8c741fc..0ad81f9 100755
--- a/share/hackvr/examples/tictactoe/game.sh
+++ b/share/hackvr/examples/tictactoe/game.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
turn=$( expr $RANDOM % 2)
-cat camera.pos
+cat camera.pos board
echo "go. player: $turn" >&2
stdbuf -oL uniq \
| grep --line-buffered action \
diff --git a/share/hackvr/examples/tictactoe/listen.sh b/share/hackvr/examples/tictactoe/listen.sh
index 0318cd2..b98fe37 100755
--- a/share/hackvr/examples/tictactoe/listen.sh
+++ b/share/hackvr/examples/tictactoe/listen.sh
@@ -9,8 +9,8 @@ mknod pin p
mknod p1out p
mknod p2out p
-cat board p1out | ncat -lp 1050 > pin &
-cat board p2out | ncat -lp 1051 > pin &
+cat p1out | ncat -lp 1050 > pin &
+cat p2out | ncat -lp 1051 > pin &
cat pin | ./game.sh | tee p1out p2out
diff --git a/share/hackvr/examples/tictactoe/run b/share/hackvr/examples/tictactoe/run
index 0f14b8f..4d49770 100755
--- a/share/hackvr/examples/tictactoe/run
+++ b/share/hackvr/examples/tictactoe/run
@@ -2,5 +2,5 @@
turn=$( expr $RANDOM % 2)
echo "go. player: $turn"
mknod p p
-stdbuf -oL cat board p | hackvr | ./game.sh > p
+stdbuf -oL p | hackvr | ./game.sh > p
rm p