Skip to content
This repository was archived by the owner on Aug 21, 2023. It is now read-only.

bverhoeve/viper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Brecht Verhoevesanderdewilde
Brecht Verhoeve
and
Apr 22, 2020
280d15a · Apr 22, 2020

History

53 Commits
Apr 18, 2020
Apr 13, 2020
Apr 18, 2020
Apr 13, 2020
Apr 22, 2020
Apr 13, 2020
Apr 8, 2020
Apr 12, 2020
Apr 18, 2020
Apr 19, 2020
Apr 12, 2020
Apr 13, 2020
Apr 13, 2020
Apr 13, 2020

Repository files navigation

Viper

A battlesnake for https://play.battlesnake.com/

Deploying the app with Heroku

Create an app on Heroku, which prepares Heroku to receive your source code:

$ heroku create <name of the app>

Now deploy the code to Heroku:

$ git push heroku master

Ensure that at least one instance of the app is running:

$ heroku ps:scale web=1

Now visit the app at the URL generated by its app name. As a handy shortcut, you can open the website as follows:

$ heroku open

Viewing logs

If you need to check the logs of the deployed app:

$ heroku logs --tail

Running the app locally

You can run the app locally with Heroku:

$ heroku local

The Battlesnake field

The battlesnake field is a 2D grid with integer coordinates. The origin is located in the top-left corner. The width and height of the board are the outer borders of each board and can be seen as the length of the coordinate arrays. This is represented in the figure below: Battlesnake field