(()=>{var e,r,t,s={8967:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=8967,e.exports=r},4120:e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id=4120,e.exports=r},5689:(e,r,t)=>{var s={"./bin":6973,"./bin.js":6973,"./helpers/cpu":9322,"./helpers/cpu.js":9322,"./helpers/parallel":4014,"./helpers/parallel.js":4014,"./history":8307,"./history.js":8307,"./procfile":7645,"./procfile.js":7645,"./ps":9614,"./ps.js":9614,"./stats":8610,"./stats.js":8610,"./wmic":2677,"./wmic.js":2677};function o(e){var r=i(e);return t(r)}function i(e){if(!t.o(s,e)){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}return s[e]}o.keys=function(){return Object.keys(s)},o.resolve=i,e.exports=o,o.id=5689},2791:function(e,r,t){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});const o=t(2272),i=s(t(1058)),n=new(t(3651).LuxDesign)("lux_ai_2021"),a=o.create(n,{name:"Lux AI 2021",loggingLevel:o.Logger.LEVEL.NONE,activateStation:!1,observe:!1,createBotDirectories:!1}),u=i.default.createInterface({input:process.stdin,output:process.stdout,terminal:!1});(async()=>{let e=null;for await(const r of u){const t=JSON.parse(r);if(t.type&&"start"===t.type){const r={detached:!0,agentOptions:{detached:!0},storeReplay:!1,storeErrorLogs:!1,seed:parseInt(t.config.seed),mapType:t.config.mapType,parameters:{MAX_DAYS:t.config.episodeSteps}};e=await a.createMatch([{file:"blank",name:"bot1"},{file:"blank",name:"bot2"}],r),e.agents.forEach(((e,r)=>{console.log(JSON.stringify(e.messages)),e.messages=[]}))}else if(t.length){const r=[];[0,1].forEach((e=>{if(t[e].action){const s=t[e].action.map((r=>({agentID:e,command:r})));r.push(...s)}}));const s=await e.step(r);e.agents.forEach((e=>{console.log(JSON.stringify(e.messages)),e.messages=[]}));const o=e.state;console.log(JSON.stringify({status:s,turn:o.game.state.turn,max:e.configs.parameters.MAX_DAYS}))}}})()},2357:e=>{"use strict";e.exports=require("assert")},4293:e=>{"use strict";e.exports=require("buffer")},3129:e=>{"use strict";e.exports=require("child_process")},7619:e=>{"use strict";e.exports=require("constants")},6417:e=>{"use strict";e.exports=require("crypto")},881:e=>{"use strict";e.exports=require("dns")},8614:e=>{"use strict";e.exports=require("events")},5747:e=>{"use strict";e.exports=require("fs")},8605:e=>{"use strict";e.exports=require("http")},7211:e=>{"use strict";e.exports=require("https")},1631:e=>{"use strict";e.exports=require("net")},2087:e=>{"use strict";e.exports=require("os")},5622:e=>{"use strict";e.exports=require("path")},1191:e=>{"use strict";e.exports=require("querystring")},1058:e=>{"use strict";e.exports=require("readline")},2413:e=>{"use strict";e.exports=require("stream")},4304:e=>{"use strict";e.exports=require("string_decoder")},3867:e=>{"use strict";e.exports=require("tty")},8835:e=>{"use strict";e.exports=require("url")},1669:e=>{"use strict";e.exports=require("util")},8761:e=>{"use strict";e.exports=require("zlib")}},o={};function i(e){var r=o[e];if(void 0!==r)return r.exports;var t=o[e]={id:e,loaded:!1,exports:{}};return s[e].call(t.exports,t,t.exports,i),t.loaded=!0,t.exports}i.m=s,i.x=()=>{var e=i.O(void 0,[540],(()=>i(2791)));return i.O(e)},i.amdD=function(){throw new Error("define cannot be used indirect")},i.amdO={},e=[],i.O=(r,t,s,o)=>{if(!t){var n=1/0;for(c=0;c<e.length;c++){for(var[t,s,o]=e[c],a=!0,u=0;u<t.length;u++)(!1&o||n>=o)&&Object.keys(i.O).every((e=>i.O[e](t[u])))?t.splice(u--,1):(a=!1,o<n&&(n=o));a&&(e.splice(c--,1),r=s())}return r}o=o||0;for(var c=e.length;c>0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[t,s,o]},i.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return i.d(r,{a:r}),r},i.d=(e,r)=>{for(var t in r)i.o(r,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((r,t)=>(i.f[t](e,r),r)),[])),i.u=e=>e+".js",i.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),t={179:1},i.O.require=e=>t[e],i.f.require=(e,r)=>{t[e]||(e=>{var r=e.modules,s=e.ids,o=e.runtime;for(var n in r)i.o(r,n)&&(i.m[n]=r[n]);o&&o(i);for(var a=0;a<s.length;a++)t[s[a]]=1;i.O()})(require("./"+i.u(e)))},r=i.x,i.x=()=>(i.e(540),r()),i.x()})();