diff options
Diffstat (limited to 'share/hackvr/examples/tictactoe')
-rw-r--r-- | share/hackvr/examples/tictactoe/board | 13 | ||||
-rw-r--r-- | share/hackvr/examples/tictactoe/board_orig | 14 | ||||
-rw-r--r-- | share/hackvr/examples/tictactoe/camera.pos | 5 | ||||
-rwxr-xr-x | share/hackvr/examples/tictactoe/game.sh | 37 | ||||
-rwxr-xr-x | share/hackvr/examples/tictactoe/listen.sh | 11 | ||||
-rw-r--r-- | share/hackvr/examples/tictactoe/marker0 | 2 | ||||
-rw-r--r-- | share/hackvr/examples/tictactoe/marker1 | 1 | ||||
-rwxr-xr-x | share/hackvr/examples/tictactoe/run | 4 |
8 files changed, 0 insertions, 87 deletions
diff --git a/share/hackvr/examples/tictactoe/board b/share/hackvr/examples/tictactoe/board deleted file mode 100644 index e7494fd..0000000 --- a/share/hackvr/examples/tictactoe/board +++ /dev/null @@ -1,13 +0,0 @@ -_reset addshape 2 3 -4 6 4 -5 6 4 -4 5 4 - -boardtopleft addshape 2 4 -3 13 4 -1 13 4 -1 11 4 -3 11 4 -boardtopcenter addshape 2 4 -1 13 4 1 13 4 1 11 4 -1 11 4 -boardtopright addshape 2 4 1 13 4 3 13 4 3 11 4 1 11 4 - -boardmiddleleft addshape 2 4 -3 11 4 -1 11 4 -1 9 4 -3 9 4 -boardmiddlecenter addshape 2 4 -1 11 4 1 11 4 1 9 4 -1 9 4 -boardmiddleright addshape 2 4 1 11 4 3 11 4 3 9 4 1 9 4 - -boardbottomleft addshape 2 4 -3 9 4 -1 9 4 -1 7 4 -3 7 4 -boardbottomcenter addshape 2 4 -1 9 4 1 9 4 1 7 4 -1 7 4 -boardbottomright addshape 2 4 1 9 4 3 9 4 3 7 4 1 7 4 diff --git a/share/hackvr/examples/tictactoe/board_orig b/share/hackvr/examples/tictactoe/board_orig deleted file mode 100644 index 2fff3ba..0000000 --- a/share/hackvr/examples/tictactoe/board_orig +++ /dev/null @@ -1,14 +0,0 @@ -_reset addshape 2 3 -4 -4 4 -5 -4 4 -4 -5 4 -_exit addshape 2 3 4 -4 4 5 -4 4 4 -5 4 - -boardtopleft addshape 2 4 -3 3 4 -1 3 4 -1 1 4 -3 1 4 -boardtopcenter addshape 2 4 -1 3 4 1 3 4 1 1 4 -1 1 4 -boardtopright addshape 2 4 1 3 4 3 3 4 3 1 4 1 1 4 - -boardmiddleleft addshape 2 4 -3 1 4 -1 1 4 -1 -1 4 -3 -1 4 -boardmiddlecenter addshape 2 4 -1 1 4 1 1 4 1 -1 4 -1 -1 4 -boardmiddleright addshape 2 4 1 1 4 3 1 4 3 -1 4 1 -1 4 - -boardbottomleft addshape 2 4 -3 -1 4 -1 -1 4 -1 -3 4 -3 -3 4 -boardbottomcenter addshape 2 4 -1 -1 4 1 -1 4 1 -3 4 -1 -3 4 -boardbottomright addshape 2 4 1 -1 4 3 -1 4 3 -3 4 1 -3 4 diff --git a/share/hackvr/examples/tictactoe/camera.pos b/share/hackvr/examples/tictactoe/camera.pos deleted file mode 100644 index ef8e9da..0000000 --- a/share/hackvr/examples/tictactoe/camera.pos +++ /dev/null @@ -1,5 +0,0 @@ -junk set global.zoom 45 -junk set camera.p.z -6 -junk set camera.p.y -1 -junk set camera.p.x 0 - diff --git a/share/hackvr/examples/tictactoe/game.sh b/share/hackvr/examples/tictactoe/game.sh deleted file mode 100755 index a2adeb1..0000000 --- a/share/hackvr/examples/tictactoe/game.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bash -turn=$( expr $RANDOM % 2) -BOARDFILE=board_orig -cat camera.pos $BOARDFILE -echo "go. player: $turn" >&2 -grep --line-buffered action \ - | while read user action group;do - if [ $action = "action" ];then - if grep "_reset" <<<$group >/dev/null;then - printf "%s deleteallexcept %s\n" "$user" "$user" - cat $BOARDFILE - continue - elif grep "_exit" <<<$group >/dev/null;then - #if a program wants to exit, it should just exit. - #the program may have been ran by some other program. - #maybe just filter out server-side quit messages for your own username? - #any user quit will cause any hackvr to quit? - #printf "%s quit\n" "$user" - exit 0 - elif grep "_" <<<$group >/dev/null;then - echo CUT IT OUT > /dev/stderr - continue - elif grep "^board" <<<$group >/dev/null;then - turn=$(expr \( $turn + 1 \) % 2) - #printf "# turn: %d\n" "$turn" > /dev/stderr - printf "%s deletegroup %s\n" "$user" "$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" $BOARDFILE | grep -v '^#' | tr -s ' ' | cut '-d ' -f5)" - translatey="$(grep "$group" $BOARDFILE | grep -v '^#' | tr -s ' ' | cut '-d ' -f6)" - cat "marker$turn" | offsetshape.sh $translatex "$(expr "$translatey" - 2 )" 0 - grep "$group" $BOARDFILE | sed "s/$group/_marked/g" - else - printf "# clicked outside of the game board.\n" >&2 - fi - fi - done diff --git a/share/hackvr/examples/tictactoe/listen.sh b/share/hackvr/examples/tictactoe/listen.sh deleted file mode 100755 index deac685..0000000 --- a/share/hackvr/examples/tictactoe/listen.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -#to finish out any that might still be listening -nc -z 127.0.0.1 1050 -nc -z 127.0.0.1 1051 - -echo hackvr://$(hostname).$(domainname):1050/ player 1 -echo hackvr://$(hostname).$(domainname):1051/ player 2 - -coproc ./game.sh -tee >(ncat -lp 1050 >&"${COPROC[1]}") >(ncat -lp 1051 >&"${COPROC[1]}") >/dev/null <&"${COPROC[0]}" diff --git a/share/hackvr/examples/tictactoe/marker0 b/share/hackvr/examples/tictactoe/marker0 deleted file mode 100644 index 5bc0c5c..0000000 --- a/share/hackvr/examples/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/share/hackvr/examples/tictactoe/marker1 b/share/hackvr/examples/tictactoe/marker1 deleted file mode 100644 index e7aa5a7..0000000 --- a/share/hackvr/examples/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/share/hackvr/examples/tictactoe/run b/share/hackvr/examples/tictactoe/run deleted file mode 100755 index 54d712a..0000000 --- a/share/hackvr/examples/tictactoe/run +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash -turn=$( expr $RANDOM % 2) -echo "# go. player: $turn" >&2 -hackvr_coproc ./game.sh |