agar
v1.0.2
Published
Utility libraries for interacting with agar.io
Downloads
10
Readme
Agar
Utility libraries for interacting with agar.io
var AgarBackend = require('agar').AgarBackend;
var GameState = require('agar').GameState;
var Controller = require('agar').Controller;
var Agent = require('agar').Agent;
// Initialize backend, game state, and controller.
var backend = new AgarBackend();
var state = new GameState(backend);
var controller = new Controller(backend);
var agent = new Agent(state, controller);
agent.setStep(function(state, controller) {
// state is the same as GameState above
controller.move(0, 0);
});
backend.connect();
agent.run();
Installation
$ npm install agar
API
TODO(ibash) introduce each library and it's API.