starter-snake-go

command module
v0.0.0-...-32f3c92 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2022 License: MIT Imports: 5 Imported by: 0

README

Battlesnake Go Starter Project

An official Battlesnake template written in Go. Get started at play.battlesnake.com.

Battlesnake Logo

This project is a great starting point for anyone wanting to program their first Battlesnake in Go. It can be run locally or easily deployed to a cloud provider of your choosing. See the Battlesnake API Docs for more detail.

Run on Replit

Technologies Used

This project uses Go. It also comes with an optional Dockerfile to help with deployment.

Run Your Battlesnake

Start your Battlesnake

go run .

You should see the following output once it is running

Running your Battlesnake at http://0.0.0.0:8000

Open localhost:8000 in your browser and you should see

{"apiversion":"1","author":"","color":"#888888","head":"default","tail":"default"}

Play a Game Locally

Install the Battlesnake CLI

Command to run a local game

battlesnake play -W 11 -H 11 --name 'Go Starter Project' --url http://localhost:8000 -g solo --browser

Next Steps

Continue with the Battlesnake Quickstart Guide to customize and improve your Battlesnake's behavior.

Note: To play games on play.battlesnake.com you'll need to deploy your Battlesnake to a live web server OR use a port forwarding tool like ngrok to access your server locally.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL