diff options
author | epoch <epoch@thebackupbox.net> | 2022-08-17 21:34:02 -0500 |
---|---|---|
committer | epoch <epoch@thebackupbox.net> | 2022-08-17 21:34:02 -0500 |
commit | 6492ba6b4107a4da228e18db4fc5fc871bfb0579 (patch) | |
tree | 11301c4e20d9a1448337e73b62a16ab1bfeba457 /share/hackvr/examples/tictactoe/game.sh | |
parent | 49d54d7582bdcbdcff5637e72e9f29bb5cc571bd (diff) | |
download | hackvr-master.tar.gz hackvr-master.zip |
updated README to show that everything that got deleted went to an -extras repo. also, hackvr script updated to be better bashHEADmaster
Diffstat (limited to 'share/hackvr/examples/tictactoe/game.sh')
-rwxr-xr-x | share/hackvr/examples/tictactoe/game.sh | 37 |
1 files changed, 0 insertions, 37 deletions
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 |