diff options
author | epoch <epoch@hacking.allowed.org> | 2018-03-29 19:48:58 -0500 |
---|---|---|
committer | epoch <epoch@hacking.allowed.org> | 2018-03-29 19:48:58 -0500 |
commit | 9e49dcb25e7ccea65948adb07be6206f867b79f5 (patch) | |
tree | fffcb9db8d1aa001696dccfdbee0fe75f14c3c5e /tictactoe/game.sh | |
parent | bd406f6b15bc13861d235615fac3c7cbfee31a76 (diff) | |
download | hackvr-9e49dcb25e7ccea65948adb07be6206f867b79f5.tar.gz hackvr-9e49dcb25e7ccea65948adb07be6206f867b79f5.zip |
moved tictactoe and made the reset button not move user back to default position
Diffstat (limited to 'tictactoe/game.sh')
-rwxr-xr-x | tictactoe/game.sh | 29 |
1 files changed, 0 insertions, 29 deletions
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 |