Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- white="$1" # the program playing white
- black="$2" # the program playing black
- pos="WEEEEEEEEEEEEEEEEEEEEEEEEEEEOXEEEEEEXOEEEEEEEEEEEEEEEEEEEEEEEEEEE"
- # compile the code first:
- move=`$white $pos 2 1`
- move=`$black $pos 2 1`
- STARTTIME=$(date +%s)
- myArray=("$@")
- if [ $# == 3 ] && [ "$3" == "all" ];
- then
- myArray=(2 3 4 5 6 7 8 9 10)
- fi
- for arg in "${myArray[@]}";
- do
- if [ "$arg" != "$white" ] && [ "$arg" != "$black" ]
- then
- ./othelloChecker $white $black $arg
- fi
- done
- ENDTIME=$(date +%s)
- totalTime=$(($ENDTIME - $STARTTIME))
- let "minutes = totalTime/60"
- let "seconds = (totalTime - (60 * minutes))"
- echo "It took $minutes minutes $seconds seconds to check all"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement