A simple Battlesnake written in Java.
Deployed to https://battlesnake-liquid.herokuapp.com/
Battlesnake documentation can be found at https://docs.battlesnake.com/.
Variations of this snake have participated in multiple Battlesnake competitions.
-
Competed in the veteran division of Battlesnake: Stay Home and Code as 🚚🦴🐶 𝗪𝗔𝗟𝗧𝗘𝗥 👑 🚒
-
Competed in the expert division of Battlesnake 2019 & Battlesnake 2019 Winter Classic as 🐍 𝙎𝙐𝙋𝙀𝙍 𝙎𝙇𝙄𝙈𝙀𝙔 🐍 - View Snake
-
Competed in the intermediate division Battlesnake 2018 as Solid Snake - View Snake
Our snake's strategy was aggresive. For each turn, if the snake wasn't the largest on the board, or if the health was below a specific threshold, the snake would navigate towards the closest food. Otherwise, it would try to target the other snakes' heads to either eliminate the opponent in a head-on collision or trap them by cutting off their path.
The snake beat six other competitors the second round of Group B to qualify for the Quaterfinals, where it was eliminated. There were 32 competitors in the veteran division. Our games were played on a 11x11 board with 4 food spawned at start.
Timestamp on the BattlesnakeOfficial Twitch stream is 2:16:32-2:25:35 for Group B, and 4:04:08-4:15:18 for Quaterfinals.
-
Install JDK 11 or higher
-
Install Docker + Docker compose (required for Docker container method)
-
Install Heroku CLI (required for Heroku CLI method)
-
Install .war Heroku deployment plug-in
heroku plugins:install heroku-cli-deploy
) (required for Heroku CLI method) -
Create a Heroku App online or using the Heroku CLI with
heroku create <name>
(alternatively any other hosting service can be used)
Online
Goto play.battlesnake.io
Gradle
- Run the project using either
./gradle run
orgradlew run
for UNIX and Windows platforms respectively. This will build and run the project as a `JAR` using Webapp Runner. - Use
http://localhost:8080
as the snake URL.
- Build the project using either
./gradle build
orgradlew build
for UNIX and Windows platforms respectively. - Run the Docker Tomcat image in a container with
docker-compose up
. - Use
http://localhost:8080/battlesnake
as the snake URL.
Heroku-GitHub Integration
- Go the dashboard for the Heroku app.
- Click on the
deploy
tab. - Scroll down to the
Deployment method
and selectGitHub
. - Enter the repository name and click
Connect
.
- Build .war file
./gradlew build
- Deploy to Heroku
heroku war:deploy build/libs/battlesnake.war --app <name>
- Use
https://[name].herokuapp.com/
as the snake URL.
- Built by Jaxson Van Doorn and Ben Austin
- Adapted from tflinz's snake
- Designed for Battlesnake Official's competition