An unofficial Battlesnake template for Java users, written in Go.
If you'd like to use repl.it to run your Battlesnake server, click the link below and press "fork" on the top right.
To start your Battlesnake, press the "Start" button at the top of your repl.it server!
You should see the following at the top right of your repl.it app:
{"apiversion":"1","author":"","color":"#888888","head":"default","tail":"default"}
To start your Battlesnake, run the following command (requires Golang and Java installed):
javac Main.java && go run ./server
You should see the following output once it is running
Running your Battlesnake at http://0.0.0.0:8000
Open localhost:8000 and you should see
{"apiversion":"1","author":"","color":"#888888","head":"default","tail":"default"}
To output the board layout at every turn, run the following command in the console:
go run ./server verbose
Head to Main.java
to start building your snake! There is more information provided in the file.
Try to make your Battlesnake smarter by avoiding other snakes and the edges of the board, going towards food, and suviving the arena as long as possible!
Note: To play games and tournaments, you'll need to deploy your Battlesnake to a live web server. Here is a repl.it template that you can fork to get your server live.
You can also use ngrok if you choose to run the server locally.