A simple Battlesnake AI written in Java.
Visit https://docs.battlesnake.io for API documentation and instructions for running your AI.
This snake is built using a lightweight http server Spark framework - http://sparkjava.com/documentation
- Install JDK 8 http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
- Install Maven https://maven.apache.org/install.html
mvn compile exec:exec
Snake will start up on port 8080
This snake has also been run from within Intellij successfully.
mvn compile test
mvn compile package
Will result in a jar file in target
called starter-snake-java.jar
You can then run this file with the command
java -jar target/starter-snake-java.jar
- Create a new Heroku app:
heroku create [APP_NAME]
- Deploy code to Heroku servers:
git push heroku master
- Open Heroku app in browser:
heroku open
or visit http://APP_NAME.herokuapp.com.
- View server logs with the
heroku logs
command:
heroku logs --tail