aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xfullcomp.sh36
1 files changed, 1 insertions, 35 deletions
diff --git a/fullcomp.sh b/fullcomp.sh
index bb4f59a..88ad0a3 100755
--- a/fullcomp.sh
+++ b/fullcomp.sh
@@ -1,36 +1,2 @@
#!/usr/bin/env bash
-BINARIES="./gluon ./neutrino ./randino ./charm"
-
-if [[ ! -e competitions ]]; then
- mkdir competitions || exit 1
-fi
-
-find competitions -type f -delete
-
-for p1 in $BINARIES; do
- for p2 in $BINARIES; do
- if [[ $p1 == $p2 ]]; then
- continue
- fi
- printf "%s\n%s\n" $p1 $p2 >competition.txt
- ./competition.py $@
- status=$?
- if [[ $status != 0 ]]; then
- echo "$p1 - $p2 : ERROR $status (0-0)"
- continue
- fi
- p1pretty=$(echo "$p1" | sed 's/[^a-zA-Z0-9 ]//g')
- p2pretty=$(echo "$p2" | sed 's/[^a-zA-Z0-9 ]//g')
- complogfile="competitions/game_${p1pretty}_vs_${p2pretty}.txt"
- lastline=$(tail -n1 $complogfile)
- if [[ "$lastline" == "P1 won" ]]; then
- echo "$p1 - $p2 : WIN - LOSS (3-1)"
- elif [[ "$lastline" == "P2 won" ]]; then
- echo "$p1 - $p2 : LOSS - WIN (1-3)"
- elif [[ "$lastline" == "Tie" ]]; then
- echo "$p1 - $p1 : TIE (1-1)"
- fi
- done
-done
-
-./fullcompstats.py
+env num_cores=1 ./fullcompMT.sh $@