Created
November 15, 2018 03:10
-
-
Save tmarble/7c8c610a26695725ccd3e43472b74821 to your computer and use it in GitHub Desktop.
run_game2.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
jar="target/MyBot.jar" | |
if [ ! -e "$jar" ]; then | |
echo "Building uberjar..." | |
lein uberjar | |
else | |
echo "uberjar up to date..." | |
fi | |
seed=166518260 | |
bot0="java -jar $jar $seed" | |
bot1=$bot0 | |
timestamp=$(date +%Y-%m-%d_%H:%M:%S) | |
if [ -d "$timestamp" ]; then | |
echo "Log directory $timestamp already exists" | |
exit 1 | |
fi | |
mkdir "$timestamp" | |
./halite --replay-directory "$timestamp" --width 32 --height 32 --seed $seed "$bot0" "$bot1" | |
mv bot-*.log "$timestamp" | |
echo "Saved logs in $timestamp" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment