Project

amygdala

0.0
No release in over a year
A simple framework for developing a Battlesnake API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.1
~> 2.0
~> 13.0
~> 3.0
~> 1.3

Runtime

~> 3.0
 Project Readme

Amygdala

A "Lizard Brain" for your Battlesnake

Installation

Add this line to your application's Gemfile:

gem 'amygdala'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install amygdala

Usage

Amygdala is a simple Sinatra application. To get up and running, create a Rack configuration file that sets a move handler and starts the server. This is a minimal config.ru file that will always respond with a move of "up".

# config.ru

require "amygdala"

class Player
  class << self
    def move(data)
      "up"
    end
  end
end

Amygdala.set_configs({
  author: "foo"
})

Amygdala.set_move_handler(Player.method(:move))

run Amygdala::Server

Now call rackup config.ru to launch a BattleSnake server.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/allknowingfrog/amygdala.

License

The gem is available as open source under the terms of the MIT License.