",b="
";1===this.story?(a="",a+="Movement",a+="
",a+="Attack",a+="
",a+="
W
",a+="
A
",a+="
S
",a+="
D
",a+="
",a+="Mouse to aim
Left mouse to shoot",b+="There once was a little data-packet,
trapped in a looped network."):2===this.story?(a+="Data Gain",a+="
",a+="Overload crawlers and pulsars with
ping requests to gain their data bits.",b+="He found a way to glitch the system,
overloading the hostile entities and learning their secrets."):3===this.story?b+="The data gained through his experience helped
him to understand how to bend the Nexus to his advantage.":4===this.story?b+="The little packet was convinced he would fulfil his destiny,
unaware that the looping Nexus was just drawing him in deeper.":5===this.story&&(a+="Nexus source",a+="
",a+="For every two layers you complete, you gain
one free upgrade on your future play-throughs.",b+="As the little packet moved deeper through the Nexus, his
understanding of the source grew and he knew this would serve him well one day."),a+="
",b+="",this.tutorialElem.innerHTML=a,this.storyElem.innerHTML=b,this.story++}},update:function(){!this.clear&&Enemies.enemiesKilled()&&(this.clear=!0,this.exitTime=Date.now()+500),null!==this.exitTime&&(this.exitTime+=Game.updateTimer()),null!==this.exitTime&&Date.now()>=this.exitTime&&Player.alive&&(this.exitTime=null,Network.updateMap(),Player.availableUG>0?Menu.toggle("upgrade"):Menu.toggle("map"))}},Network={mapElem:document.querySelector("#map"),mapCtx:document.querySelector("#mapLines").getContext("2d"),mapHead:document.querySelector("#mapLayer"),width:730,height:400,level:1,highestLevel:1,layer:0,colour:[],currentRow:0,currentCol:0,workingMap:[],goToNextLevel:!1,tutorial:!0,levelData:[createLevel([[0,0,0,0,0],[0,0,0,0,0],[1,3,3,3,3],[0,0,0,0,0],[0,0,0,0,0]],[[[],[],[],[],[]],[[],[],[],[],[]],[[2],[2],[2],[2],[2]],[[],[],[],[],[]],[[],[],[],[],[]]]),createLevel([[0,0,0,0,3],[0,5,3,5,5],[1,0,5,6,3],[0,3,0,3,0],[0,0,3,6,5]],[[[],[],[],[],[0]],[[],[1,2],[1,2],[0,1],[1]],[[1,3],[],[2,3],[1,2],[2]],[[],[2,4],[],[2,4],[]],[[],[],[3,4],[4],[4]]]),createLevel([[0,0,3,0,3],[0,5,0,5,0],[1,3,3,0,6],[0,0,5,5,0],[0,0,0,6,3]],[[[],[],[1],[],[0]],[[],[0],[],[0,2],[]],[[1,2],[2,3],[1,3],[],[2]],[[],[],[3,4],[2,4],[]],[[],[],[],[4],[4]]]),createLevel([[0,0,0,0,5],[0,0,3,6,0],[1,3,3,5,3],[0,5,3,0,6],[0,0,0,5,3]],[[[],[],[],[],[0]],[[],[],[1,2],[0,2],[]],[[2,3],[1,2],[2],[2,3],[2]],[[],[3],[2,4],[],[3]],[[],[],[],[3,4],[4]]]),createLevel([[0,0,3,5,0],[0,3,5,6,3],[1,0,3,5,5],[0,5,5,0,6],[0,0,3,3,3]],[[[],[],[0,1],[1],[]],[[],[0,1,2],[1,2],[1],[1]],[[1,3],[],[2],[1,2,3],[2]],[[],[3,4],[2,4],[],[3]],[[],[],[4],[3,4],[4]]]),createLevel([[0,0,5,5,6],[0,5,3,0,3],[1,3,3,3,0],[0,0,5,0,6],[0,0,0,5,3]],[[[],[],[0],[0,1],[0]],[[],[0,1],[2],[],[1]],[[1,2],[2,3],[2],[1,3],[]],[[],[],[2,4],[],[3]],[[],[],[],[3,4],[4]]])],init:function(){this.colour[0]="rgba(0,0,0,0)",this.colour[1]="#24FF96",this.colour[2]="#FFF",this.colour[3]="#808080",this.colour[4]="#282828",this.colour[5]="#3EFFEC",this.colour[6]="#FF945F"},start:function(){this.level>1&&(this.tutorial=!1),this.tutorial?this.layer=0:this.layer=randomInt(1,5),this.currentRow=2,this.currentCol=0;for(var a=0;a<5;a++){this.workingMap[a]=[];for(var b=0;b<5;b++)this.workingMap[a][b]=this.levelData[this.layer].map[a][b]}this.showMap()},showMap:function(){this.mapElem.innerHTML="",this.mapHead.innerHTML="Network layer: "+this.level;for(var a="",b=[" btnGreen fillGreen"," btnWhite fillWhite"," btnGrey"," btnDarkGrey"," btnBlue"," btnOrange"],c=0;c
";for(var d=0;d<5;d++)if(0!==this.workingMap[d][c]){if(a+="click here
":"'> "}a+=""}a+="