function TournamentSim(config){ var self = this; self.id = config.id; // APP var app = new PIXI.Application(500, 500, {transparent:true}); self.dom = app.view; // DOM self.dom.className = "object"; //self.dom.classList.add("fader"); self.dom.style.left = config.x+"px"; self.dom.style.top = config.y+"px"; self.dom.style.border = "1px solid rgba(0,0,0,0.2)"; // CREATE A RING OF AGENTS var AGENTS = [ {strategy:"all_c", count:20}, {strategy:"all_d", count:5}, {strategy:"grim", count:2}, {strategy:"tft", count:2}, ]; var _convertCountToArray = function(countList){ var array = []; for(var i=0; i