Summit CS Bot
This is a quick and dirty node module for you to access the vindinum server.
You just have to:
var Bot = ;var PF = Botpathfinding;var Promise = Botpromise;var bot = 'key' 'location' 'url'; // var bot = new Bot('YOUR_KEY_HERE', 'arena', 'http://24.6.28.217:9000'); //Put your bot's code here and change training to Arena when you want to fight others.var goDir;Botprototype { return { _this = bot; /* Write your bot below Here */ /* Set `bot.goDir` in the direction you want to go */ //<--- In this case, set myDir to what you want and it will set bot.goDir to that at the end. /* * * This Code is global data! * * */ // Set myDir to what you want and it will set bot.goDir to that direction at the end. Unless it is "none" var myDir; var myPos = botyourBotposx botyourBotposy; var enemyBots = ; ifbotyourBotid != 1 enemyBots; ifbotyourBotid != 2 enemyBots; ifbotyourBotid != 3 enemyBots; ifbotyourBotid != 4 enemyBots; /* * * This Code Decides WHAT to do * * */ var task; task = "freemines"; /* * * This Code Determines HOW to do it * * */ // This Code find the nearest freemine and sets myDir toward that direction // iftask === "freemines" var closestMine = botfreeMines0; fori = 0; i < botfreeMineslength; i++ ifbot > bot closestMine = botfreeMinesi; console; myDir = bot; /* * * This Code Sets your direction based on myDir. If you are trying to go to a place that you can't reach, you move randomly. * * Otherwise you move in the direction set by your code. */ ifmyDir === "none" console; var rand = Math; var dirs = "north" "south" "east" "west"; botgoDir = dirsrand; else botgoDir = myDir; /* DON'T REMOVE ANTYTHING BELOW THIS LINE */ ; };}bot;
instead of having to clone the entire repo for the vind server.