Skip to content

Instantly share code, notes, and snippets.

View Radvylf's full-sized avatar

Ryan Tosh Radvylf

View GitHub Profile
@Radvylf
Radvylf / controller.js
Created January 11, 2019 04:18
You'll need to add your own system of ending games, for now I just have a system for animating games. Put your bots in the run variable, following the example templates.
var Positions = {
SOLDIER: 0,
CANNON: 1,
SPY: 2,
CAPTAIN: 3,
GENERAL: 4
};
var Moves = {
NONE: [0],
MOVE: {
@Radvylf
Radvylf / Canvas Viewer.js
Last active August 14, 2018 13:35
Gold Collectors KoTH controller
//ATTENTION:
//Paste this code into the Developer Console on about:blank, and press enter. To activate, type activateCanvas(fps, turns)
var botData =
[
{
name: "Bot Name",
run: function() {
//function
}