-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintcache
1 lines (1 loc) · 48.5 KB
/
.eslintcache
1
[{"/Users/victorxirauguardans/Desktop/UNI/PW/Practica2/P2-PW/src/index.js":"1","/Users/victorxirauguardans/Desktop/UNI/PW/Practica2/P2-PW/src/App.js":"2","/Users/victorxirauguardans/Desktop/UNI/PW/Practica2/P2-PW/src/assets/index.js":"3","/Users/victorxirauguardans/Desktop/UNI/PW/Practica2/P2-PW/src/assets/avatars/index.js":"4","/Users/victorxirauguardans/Desktop/UNI/PW/Practica2/P2-PW/src/assets/audio/index.js":"5"},{"size":222,"mtime":1609683630404,"results":"6","hashOfConfig":"7"},{"size":45397,"mtime":1609873720962,"results":"8","hashOfConfig":"7"},{"size":1076,"mtime":1609870612845,"results":"9","hashOfConfig":"7"},{"size":1020,"mtime":1609683630358,"results":"10","hashOfConfig":"7"},{"size":393,"mtime":1609842215920,"results":"11","hashOfConfig":"7"},{"filePath":"12","messages":"13","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"14"},"ms4g31",{"filePath":"15","messages":"16","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"17","usedDeprecatedRules":"14"},{"filePath":"18","messages":"19","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"14"},{"filePath":"20","messages":"21","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"22"},{"filePath":"23","messages":"24","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"14"},"/Users/victorxirauguardans/Desktop/UNI/PW/Practica2/P2-PW/src/index.js",[],["25","26"],"/Users/victorxirauguardans/Desktop/UNI/PW/Practica2/P2-PW/src/App.js",["27"],"//import logo from './logo.svg';\nimport { logo, up, left, down, right, space, espadas, escudo, marco, noObj, nord, sud, este, oeste, brujuNord, brujuSud, brujuOest, brujuEst, papeliko, pared, noPared, splash } from './assets';\nimport { avatars } from './assets/avatars';\nimport { corrupcion, hachasDestino, garras, kunai, lanza, muerte, sangre, background } from './assets/audio';\nimport Button from 'react-bootstrap/Button'\nimport 'bootstrap/dist/css/bootstrap.min.css';\nimport './App.css';\nimport Swal from 'sweetalert2/dist/sweetalert2.js'\nimport 'sweetalert2/src/sweetalert2.scss'\n\n\n\nconst constantes = {\n TOKEN: \"b89f96d2\",\n PLAYER_INFO: \n {\n x: \"\",\n y: \"\",\n player_token : \"\",\n security_code: \"\",\n direction: \"\",\n vp: \"\"\n },\n ObjectCooldown: 0\n}\n\nvar intervalID;\nvar backgroundMusic;\nvar alerta=0;\nlet found=0;\nvar objectIdentifier;\n//var estoyVivo = 0;\n\n\nwindow.onload = function() {\n var imagen = document.getElementById(\"imagenFondo\");\n var loDemas = document.getElementById(\"header\");\n imagen.style.height = loDemas.style.height;\n};\n\n\nwindow.scrollTo(0, 0);\n\nfunction makeRequest (method, url, obj) {\n return new Promise(function (resolve, reject) {\n var xhr = new XMLHttpRequest();\n xhr.open(method, url, true);\n xhr.onload = function () {\n if (this.status >= 200 && this.status < 300) {\n resolve(xhr.response);\n } else {\n reject({\n status: this.status,\n statusText: xhr.statusText\n });\n }\n };\n xhr.onerror = function () {\n reject({\n status: this.status,\n statusText: xhr.statusText\n });\n };\n if(method==='POST'){\n xhr.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\n var newName = obj.name.replace(\" \", \"+\");\n let form = 'name='+newName+'&image='+obj.image+'&attack='+obj.attack+'&defense='+obj.defense;\n xhr.send(form);\n }else{\n if(obj){\n xhr.send(obj);\n }else{\n xhr.send();\n }\n }\n });\n}\n\n\n\nfunction findEnemy(){\n makeRequest('GET', 'http://battlearena.danielamo.info/api/playersobjects/'+constantes.TOKEN+'/'+constantes.PLAYER_INFO.player_token, null)\n .then(function (datums) {\n var obj = JSON.parse(datums);\n var total = obj.enemies.length;\n var imagen = document.getElementById(\"enemyAct\");\n found = 0;\n let k = 0;\n \n var vidaEnemic=0;\n for(k = 0; k < total; k++){\n if(constantes.PLAYER_INFO.x === obj.enemies[k].x && constantes.PLAYER_INFO.y === obj.enemies[k].y && obj.enemies[k].vitalpoints > 0){\n imagen.src = avatars[obj.enemies[k].image - 1];\n vidaEnemic = obj.enemies[k].vitalpoints;\n imagen.style.display = \"inline\";\n found = 1;\n break;\n } \n }\n var antiguo = document.getElementById(\"enemyLife\");\n\n if(found===0){\n for(k = 0; k < obj.objects.length; k++){\n if(constantes.PLAYER_INFO.x === obj.objects[k].x && constantes.PLAYER_INFO.y === obj.objects[k].y){\n imagen.src = obj.enemies[k].image;\n objectIdentifier = obj.enemies[k].token;\n imagen.style.display = \"inline\";\n found = 1;\n break;\n }\n }\n if(found===0){\n imagen.src = \"//:0\";\n imagen.style.display = \"none\";\n if(antiguo){\n antiguo.outerHTML = '';\n }\n }\n }else{\n if(antiguo){\n antiguo.outerHTML = '';\n }\n var parent = document.getElementById(\"eneimgo\");\n var divString = `<div id=\"enemyLife\" class=\"progress\"><div id=\"enemyLifeInner\" role=\"progressbar\" class=\"progress-bar bg-danger progress-bar-animated progress-bar-striped\" aria-valuenow=\"`+(vidaEnemic*2)+`\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width: `+(vidaEnemic*2)+`%;\">`+(vidaEnemic)+`vp</div></div>`;\n var newInner = divString.concat(parent.innerHTML);\n parent.innerHTML = newInner;\n }\n\n })\n .catch(function (err) {\n console.log('Augh, there was an error finding enemies!', err.statusText);\n });\n}\n\n\nfunction actuLife(){\n\n let reborn = 0;\n //console.log('FounD ES: ' + found);\n if(found!==0){\n\n\n makeRequest('GET', 'http://battlearena.danielamo.info/api/player/'+constantes.TOKEN+'/'+constantes.PLAYER_INFO.player_token, null)\n .then(function (datums) {\n var obj = JSON.parse(datums);\n \n\n if(obj.vitalpoints <=0){\n Swal.fire({\n title: 'Has mort!',\n text: \"Vols fer respawn o acabar la partida?\",\n icon: 'warning',\n showCancelButton: true,\n confirmButtonColor: '#3085d6',\n cancelButtonColor: '#d33',\n cancelButtonText: 'Vull acabar la partida',\n confirmButtonText: 'Respawn',\n }).then((result) => {\n if (result.isConfirmed) {\n makeRequest('GET', 'http://battlearena.danielamo.info/api/respawn/'+constantes.TOKEN+'/'+constantes.PLAYER_INFO.player_token+'/'+constantes.PLAYER_INFO.security_code, null)\n .then(function (datums) {\n console.log('Has revivido!');\n reborn = 1;\n\n\n })\n .catch(function (err) {\n console.log('Error respawinig', err.statusText);\n });\n }\n });\n\n /*if(reborn === 0){\n makeRequest('GET', 'http://battlearena.danielamo.info/api/remove/'+constantes.TOKEN+'/'+constantes.PLAYER_INFO.player_token+'/'+constantes.PLAYER_INFO.security_code, null)\n .then(function (datums) {\n Swal.fire(\n 'THE END',\n 'Hasta la próxima!',\n 'success'\n )\n })\n .catch(function (err) {\n console.log('Error removing', err.statusText);\n });\n \n }*/\n \n reborn = 0;\n } else {\n\n if(constantes.PLAYER_INFO.vp < obj.vitalpoints){\n console.log('Me han quitado' + (constantes.PLAYER_INFO.vp - obj.vitalpoints) + 'puntos de vida');\n }\n var barra = document.getElementById(\"barraDeLosHuevos\");\n barra.ariaValueNow=(obj.vitalpoints*2);\n barra.style.width= (obj.vitalpoints*2)+'%';\n barra.innerHTML = (obj.vitalpoints)+'vp';\n constantes.PLAYER_INFO.vp = obj.vitalpoints;\n }\n\n })\n .catch(function (err) {\n console.log('Augh, there was an error downloading the map!', err.statusText);\n });\n\n }\n\n \n}\n\nfunction showMiniMap(){\n\n\n actuLife();\n \n \n makeRequest('GET', 'http://battlearena.danielamo.info/api/map/'+constantes.TOKEN+'/'+constantes.PLAYER_INFO.player_token, null)\n .then(function (datums) {\n \n var obj = JSON.parse(datums);\n var total = obj.enemies.length;\n let j = 0;\n\n \n var w = document.getElementById(\"myCanvas\").clientWidth;\n var h = document.getElementById(\"myCanvas\").clientHeight;\n var c = document.getElementById(\"myCanvas\");\n c.width = c.offsetWidth;\n c.height = c.offsetHeight;\n var ctx = c.getContext(\"2d\");\n ctx.clearRect(0, 0, c.width*2, c.height*2);\n ctx.scale(0.91, 0.92);\n ctx.fillStyle = \"#FF0000\"; \n for(j = 0; j < total; j++) {\n ctx.fillRect((w/37)*obj.enemies[j].x+5, h-((h/37)*obj.enemies[j].y)+15, w/37 - 2 , h/37 - 2);\n }\n ctx.fillStyle = \"#FFFFFF\"; \n ctx.fillRect((w/37)*constantes.PLAYER_INFO.x+5, h-((h/37)*constantes.PLAYER_INFO.y)+15, w/37 - 2 , h/37 - 2);\n \n})\n .catch(function (err) {\n console.log('Augh, there was an error downloading the map!', err.statusText);\n });\n\n}\n\nfunction alertNovaPartida(){\n if(constantes.PLAYER_INFO.player_token === \"\" && constantes.PLAYER_INFO.security_code === \"\" ){\n alerta = 1;\n Swal.fire({\n title: \"Nueva Partida\",\n text: \"Introduce el nombre de tu jugador: \",\n input: 'text',\n showCancelButton: true \n }).then((result) => {\n if (result.value) {\n console.log(\"Result: \" + result.value);\n var nom = result.value;\n nuevaPartida(nom);\n }\n });\n }else{\n console.log('Ya has hecho spawn de un jugador!');\n }\n \n}\n\n\nfunction nuevaPartida(nom){\n \n document.getElementById(\"log\").innerHTML = '';\n if(constantes.PLAYER_INFO.player_token === \"\" && constantes.PLAYER_INFO.security_code === \"\" ){\n \n //var nom = prompt('Introduce el nombre de tu jugador:', '');\n\n if(nom!=null){\n alerta = 0;\n\n makeRequest('GET', 'http://battlearena.danielamo.info/api/spawn/'+constantes.TOKEN+'/'+nom, null)\n .then(function (datums) {\n\n \n var pergamino1 = document.getElementById('imagenFondo');\n pergamino1.style.display = 'flex';\n pergamino1.style.animationFillMode = 'forwards';\n pergamino1.style.animation = 'slideUp 1s ease';\n\n var pergamino2 = document.getElementById('imagenFondoDerecha');\n pergamino2.style.display = 'flex';\n pergamino2.style.animationFillMode = 'forwards';\n pergamino2.style.animation = 'slideUp 1s ease';\n\n var terminal = document.getElementById('terminal');\n terminal.style.display = 'inline';\n terminal.style.animationFillMode = 'forwards';\n terminal.style.animation = 'aparecer 2s ease';\n\n var bruju = document.getElementById('bruju');\n bruju.style.display = 'grid';\n bruju.style.animationFillMode = 'forwards';\n bruju.style.animation = 'aparecer 2s ease';\n\n sleep(1000).then(function(){\n var miniMapa = document.getElementById('mini');\n miniMapa.style.display = 'flex';\n miniMapa.style.animationFillMode = 'forwards';\n miniMapa.style.animation = 'aparecer 2s ease';\n \n var estadisticas = document.getElementById('stats');\n estadisticas.style.display = 'flex';\n estadisticas.style.flexDirection = 'column';\n estadisticas.style.animationFillMode = 'forwards';\n estadisticas.style.animation = 'aparecer 2s ease';\n \n var objetos = document.getElementById('objetos');\n objetos.style.display = 'grid';\n objetos.style.animationFillMode = 'forwards';\n objetos.style.animation = 'aparecer 2s ease';\n\n var control = document.getElementById('control');\n control.style.display = 'grid';\n control.style.animationFillMode = 'forwards';\n control.style.animation = 'aparecer 2s ease';\n\n var player = document.getElementById('player');\n player.style.display = 'flex';\n player.style.animationFillMode = 'forwards';\n player.style.animation = 'aparecer 2s ease';\n });\n \n \n \n\n\n backgroundMusic = new Audio(background);\n backgroundMusic.volume = 0;\n //backgroundMusic.animate.volume = '0.3 2000';\n backgroundMusic.currentTime = Math.floor(Math.random() * (5429));\n backgroundMusic.play();\n var vol=0;\n var fadeIn = setInterval(\n function() {\n if (vol < 0.1) {\n vol += 0.02;\n backgroundMusic.volume = vol;\n }\n else {\n clearInterval(fadeIn);\n }\n }, 500);\n \n var obj = JSON.parse(datums);\n constantes.PLAYER_INFO.player_token = obj.token;\n constantes.PLAYER_INFO.security_code = obj.code;\n\n\n intervalID = window.setInterval(showMiniMap, 1000);\n\n makeRequest('GET', 'http://battlearena.danielamo.info/api/player/'+constantes.TOKEN+'/'+constantes.PLAYER_INFO.player_token, null)\n .then(function (datums) {\n var obj = JSON.parse(datums);\n //estoyVivo = 1;\n constantes.PLAYER_INFO.x = obj.x;\n constantes.PLAYER_INFO.y = obj.y;\n constantes.PLAYER_INFO.vp = obj.vitalpoints;\n constantes.PLAYER_INFO.direction = obj.direction;\n var xd = 'dir:'+obj.x+'-'+obj.direction;\n var yd = 'dir:'+obj.y+'-'+obj.direction;\n if((xd==='dir:0-O') || (xd==='dir:39-E') || (yd==='dir:0-S') || (yd==='dir:39-N')){\n document.getElementById(\"escena\").style.backgroundImage = 'url('+pared+')';\n }else{\n document.getElementById(\"escena\").style.backgroundImage = 'url('+noPared+')';\n }\n var newInfo = document.createElement(\"div\");\n newInfo.id = 'informasion';\n //newInfo.style.backgroundColor = 'rgba(0, 0, 0, 0.365)';\n newInfo.style.width = '90%';\n newInfo.style.height = '90%';\n newInfo.style.color = 'black';\n newInfo.style.fonFamily = '\"Papyrus\", \"Palatino Linotype\", \"Book Antiqua\", \"Palatino\", Serif';\n var name = document.createElement(\"h2\");\n name.id = 'nombrePlayer';\n name.innerText = obj.name;\n name.style.fonFamily = '\"Papyrus\", \"Palatino Linotype\", \"Book Antiqua\", \"Palatino\", Serif';\n newInfo.appendChild(name);\n var imagen = document.createElement(\"img\");\n imagen.src = avatars[obj.image-1];\n imagen.className = 'characterImage';\n imagen.alt = 'characterImage';\n imagen.style.height='35%';\n imagen.style.width='35%';\n imagen.style.fonFamily = '\"Papyrus\", \"Palatino Linotype\", \"Book Antiqua\", \"Palatino\", Serif';\n newInfo.appendChild(imagen);\n var node = document.createElement(\"div\");\n node.className = 'life';\n node.id = 'life';\n node.innerHTML = `<div className=\"corasong\"> <img src='/static/media/corazon.d3bf3074.svg' alt='vida' height='30px'/> </div> <div class=\"progress\"><div id=\"barraDeLosHuevos\" role=\"progressbar\" class=\"progress-bar bg-danger progress-bar-animated progress-bar-striped\" aria-valuenow=\"`+(obj.vitalpoints*2)+`\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width: `+(obj.vitalpoints*2)+`%;\">`+(obj.vitalpoints)+`vp</div></div>`;\n newInfo.appendChild(node);\n var selectedObject = document.createElement(\"img\");\n selectedObject.id = \"selectedObject\";\n selectedObject.src = noObj;\n selectedObject.alt = 'selectedObject';\n selectedObject.style.height='10%';\n selectedObject.style.width='10%';\n selectedObject.style.marginTop='15px';\n newInfo.appendChild(selectedObject);\n var objectInfo = document.createElement(\"p\");\n objectInfo.id = 'objectName';\n objectInfo.textContent = 'Ningun objeto seleccionado';\n objectInfo.style.fontSize = '16px';\n objectInfo.style.marginTop='10px';\n objectInfo.style.fontWeight='bold';\n objectInfo.style.fontFamily = '\"Papyrus\", \"Palatino Linotype\", \"Book Antiqua\", \"Palatino\", Serif';\n newInfo.appendChild(objectInfo);\n var objectAttack = document.createElement(\"p\");\n objectAttack.id = 'objectAttack';\n objectAttack.textContent = 'Ataque: -';\n objectAttack.style.fontSize = '14px';\n objectAttack.style.fontWeight='bold';\n objectAttack.style.fontFamily = '\"Papyrus\", \"Palatino Linotype\", \"Book Antiqua\", \"Palatino\", Serif';\n newInfo.appendChild(objectAttack);\n var objectDefense = document.createElement(\"p\");\n objectDefense.id = 'objectDefense';\n objectDefense.textContent = 'Defensa: -';\n objectDefense.style.fontSize = '14px';\n objectDefense.style.fontWeight='bold';\n objectDefense.style.fontFamily = '\"Papyrus\", \"Palatino Linotype\", \"Book Antiqua\", \"Palatino\", Serif';\n newInfo.appendChild(objectDefense);\n document.getElementById(\"player\").appendChild(newInfo);\n \n \n var atk = document.getElementById(\"atk\");\n atk.textContent = obj.attack;\n\n var df = document.getElementById(\"df\");\n df.textContent = obj.defense;\n\n var bru = document.getElementById(\"imgBruju\");\n\n\n switch(constantes.PLAYER_INFO.direction){\n case 'N':\n bru.src = brujuNord;\n break;\n case 'O':\n bru.src = brujuOest;\n break;\n case 'E':\n bru.src = brujuEst;\n break;\n case 'S':\n bru.src = brujuSud;\n break;\n default:\n break;\n }\n \n showMiniMap();\n findEnemy();\n\n \n })\n .catch(function (err) {\n console.log('Augh, there was an error getting player info!', err.statusText);\n });\n\n })\n .catch(function (err) {\n console.log('Augh, there was an error spawning player!', err.statusText);\n });\n }\n }else{\n console.log('Ya has hecho spawn de un jugador!');\n }\n \n}\n\nfunction eliminarJugador(){\n if(constantes.PLAYER_INFO.player_token === \"\" || constantes.PLAYER_INFO.security_code === \"\" ){\n console.log('Crea un jugador primero!');\n }else{\n makeRequest('GET', 'http://battlearena.danielamo.info/api/remove/'+constantes.TOKEN+'/'+constantes.PLAYER_INFO.player_token+'/'+constantes.PLAYER_INFO.security_code, null)\n .then(function (datums) {\n \n var vol=0.1;\n var fadeOut = setInterval(\n function() {\n if (vol-0.025 > 0) {\n vol -= 0.025;\n backgroundMusic.volume = vol;\n }\n else {\n backgroundMusic.volume = 0;\n backgroundMusic.pause();\n clearInterval(fadeOut);\n }\n }, 500);\n \n \n window.clearInterval(intervalID);\n\n document.getElementById(\"log\").innerHTML = '';\n \n\n var miniMapa = document.getElementById('mini');\n miniMapa.style.animationFillMode = 'forwards';\n miniMapa.style.animation = 'meVoy 2s ease';\n \n var estadisticas = document.getElementById('stats');\n estadisticas.style.display = 'flex';\n estadisticas.style.flexDirection = 'column';\n estadisticas.style.animationFillMode = 'forwards';\n estadisticas.style.animation = 'meVoy 2s ease';\n \n var objetos = document.getElementById('objetos');\n objetos.style.animationFillMode = 'forwards';\n objetos.style.animation = 'meVoy 2s ease';\n\n var control = document.getElementById('control');\n control.style.animationFillMode = 'forwards';\n control.style.animation = 'meVoy 2s ease';\n\n var player = document.getElementById('player');\n player.style.animationFillMode = 'forwards';\n player.style.animation = 'meVoy 2s ease';\n\n var terminal = document.getElementById('terminal');\n terminal.style.animationFillMode = 'forwards';\n terminal.style.animation = 'meVoy 2s ease';\n\n var bruju = document.getElementById('bruju');\n bruju.style.animationFillMode = 'forwards';\n bruju.style.animation = 'meVoy 2s ease';\n\n var pergamino1 = document.getElementById('imagenFondo');\n var pergamino2 = document.getElementById('imagenFondoDerecha');\n sleep(2000).then(function(){\n player.style.display = 'none';\n miniMapa.style.display = 'none';\n bruju.style.display = 'none';\n terminal.style.display = 'none';\n estadisticas.style.display = 'none';\n control.style.display = 'none';\n objetos.style.display = 'none';\n\n document.getElementById(\"escena\").style.backgroundImage = 'url('+splash+')';\n\n\n document.querySelector('#player').innerHTML= '';\n\n pergamino1.style.animationFillMode = 'forwards';\n pergamino1.style.animation = 'slideDown 1s ease';\n\n pergamino2.style.animationFillMode = 'forwards';\n pergamino2.style.animation = 'slideDown 1s ease';\n });\n \n sleep(3000).then(function(){\n pergamino1.style.display = 'none';\n pergamino2.style.display = 'none';\n });\n \n\n\n var c = document.getElementById(\"myCanvas\");\n var ctx = c.getContext(\"2d\");\n ctx.clearRect(0, 0, c.width*2, c.height*2);\n\n constantes.PLAYER_INFO.player_token = \"\";\n constantes.PLAYER_INFO.security_code = \"\";\n\n var atk = document.getElementById(\"atk\");\n atk.textContent = '--';\n\n var df = document.getElementById(\"df\");\n df.textContent = '--';\n \n var imagen = document.getElementById(\"enemyAct\");\n imagen.src = \"//:0\";\n imagen.style.display = \"none\";\n \n\n\n console.log('Jugador Eliminado');\n })\n .catch(function (err) {\n console.log('Augh, there was an error removing player!', err.statusText);\n });\n }\n \n}\n\nfunction updateScroll(){\n var objDiv = document.getElementById(\"log\");\n objDiv.scrollTop = objDiv.scrollHeight\n}\n\nwindow.console = {\n log: function(str){\n var current = new Date();\n var node = document.createElement(\"div\");\n node.style.width = '100%';\n node.style.alignContent = 'start';\n node.style.margin = '0 auto';\n node.style.marginLeft = '10px'\n node.style.textAlign = 'left';\n node.style.fontFamily = 'Lucida Console,Lucida Sans Typewriter,monaco,Bitstream Vera Sans Mono,monospace';\n node.style.fontSize = '12px';\n node.style.color = 'white';\n if(typeof str === 'object'){\n str = JSON.stringify(str, null, 4);\n }\n node.appendChild(document.createTextNode('['+current.getDate()+'/'+(current.getMonth()+ 1)+'/'+current.getFullYear()+'-'+current.getHours()+':'+current.getMinutes()+':'+current.getSeconds()+'] ' + str));\n document.getElementById(\"log\").appendChild(node);\n updateScroll();\n }\n}\n\nfunction sleep (time) {\n return new Promise((resolve) => setTimeout(resolve, time));\n}\n\n \n\n\ndocument.onkeydown = function(e){\n if(constantes.PLAYER_INFO.player_token === \"\" || constantes.PLAYER_INFO.security_code === \"\" || alert===1){\n \n }else{\n switch (e.keyCode) {\n case 32:\n document.getElementById(\"space\").style.transform = \"scale(0.8)\";\n e.preventDefault();\n break;\n case 37:\n document.getElementById(\"left\").style.transform = \"scale(0.8)\";\n e.preventDefault();\n break;\n case 38:\n document.getElementById(\"up\").style.transform = \"scale(0.8)\";\n e.preventDefault();\n break;\n case 39:\n document.getElementById(\"right\").style.transform = \"scale(0.8)\";\n e.preventDefault();\n break;\n case 40:\n document.getElementById(\"down\").style.transform = \"scale(0.8)\";\n e.preventDefault();\n break;\n default:\n break;\n }\n }\n}\n\n\ndocument.onkeyup = function(e) {\n var newObj;\n var created = 0;\n var audio;\n var direction;\n \n if(alerta===0){\n if(constantes.PLAYER_INFO.player_token === \"\" || constantes.PLAYER_INFO.security_code === \"\" ){\n console.log('Crea un jugador primero!');\n }else{\n created=1;\n }\n }\n \n switch (e.keyCode) {\n case 80:\n if(created===1){\n //AQUI COHER EL OBJETO ERMANO\n if(objectIdentifier){\n makeRequest('http://battlearena.danielamo.info/api/pickup/'+constantes.TOKEN+'/'+constantes.PLAYER_INFO.player_token, objectIdentifier)\n .then(function(data){\n console.log('objeto cogido' + JSON.stringify(data));\n })\n .catch(function(error){\n console.log('Error cogido' + JSON.stringify(error));\n });\n }else{\n console.log('No hay objetos para coger');\n }\n \n }\n break;\n case 32:\n if(created===1){ \n makeRequest('GET', 'http://battlearena.danielamo.info/api/attack/'+constantes.TOKEN+'/'+constantes.PLAYER_INFO.player_token + '/' + constantes.PLAYER_INFO.direction, null)\n .then(function (datums) {\n var obj = JSON.parse(datums);\n console.log('Hay un enemigo en la dirección ' + constantes.PLAYER_INFO.direction +'! Le has hecho ' +JSON.stringify(obj) + ' puntos de daño!');\n \n\n var barraEnemigo = document.getElementById(\"enemyLifeInner\");\n var vidaActual = barraEnemigo.ariaValueNow;\n\n \n barraEnemigo.ariaValueNow=vidaActual-(obj*2);\n barraEnemigo.style.width= (vidaActual-(obj*2))+'%';\n barraEnemigo.innerHTML = ((vidaActual/2)-obj)+'vp';\n if(vidaActual-(obj*2)<=0){\n document.getElementById(\"enemyAct\").src = \"//:0\";\n document.getElementById(\"enemyAct\").style.display = 'none';\n var antiguo = document.getElementById(\"enemyLife\");\n if(antiguo){\n antiguo.outerHTML = '';\n }\n \n }\n\n\n makeRequest('GET', 'http://battlearena.danielamo.info/api/player/'+constantes.TOKEN+'/'+constantes.PLAYER_INFO.player_token, null)\n .then(function (datums) {\n var obj = JSON.parse(datums);\n var barra = document.getElementById(\"barraDeLosHuevos\");\n if(obj.vitalpoints>0){\n console.log('Te han quitado ' + (constantes.PLAYER_INFO.vp-obj.vitalpoints) + ' puntos de vida!');\n }\n barra.ariaValueNow=(obj.vitalpoints*2);\n barra.style.width= (obj.vitalpoints*2)+'%';\n barra.innerHTML = (obj.vitalpoints)+'vp';\n constantes.PLAYER_INFO.vp = obj.vitalpoints;\n });\n \n })\n .catch(function (err){\n findEnemy();\n console.log('Es inutil atacar en esta dirección! Ataca hacia otro lado! ;)');\n });\n\n \n sleep(100).then(() => {\n document.getElementById(\"space\").style.transform = \"scale(1)\"; \n }); \n\n }\n break;\n case 37:\n if(created===1){ \n constantes.PLAYER_INFO.direction = 'O';\n created=3;\n direction = 'O';\n sleep(100).then(() => {\n document.getElementById(\"left\").style.transform = \"scale(1)\";\n document.getElementById(\"imgBruju\").src = brujuOest;\n \n }); \n }\n \n \n break;\n case 38:\n if(created===1){\n constantes.PLAYER_INFO.direction = 'N';\n created=3;\n direction = 'N';\n sleep(100).then(() => {\n document.getElementById(\"up\").style.transform = \"scale(1)\";\n document.getElementById(\"imgBruju\").src = brujuNord;\n \n }); \n }\n \n break;\n case 39:\n if(created===1){\n constantes.PLAYER_INFO.direction = 'E';\n created=3;\n direction = 'E';\n sleep(100).then(() => {\n document.getElementById(\"right\").style.transform = \"scale(1)\";\n document.getElementById(\"imgBruju\").src = brujuEst;\n }); \n }\n \n break;\n case 40:\n if(created===1){\n constantes.PLAYER_INFO.direction = 'S';\n created=3;\n direction = 'S';\n sleep(100).then(() => {\n document.getElementById(\"down\").style.transform = \"scale(1)\";\n document.getElementById(\"imgBruju\").src = brujuSud;\n }); \n }\n break;\n case 81:\n if(created===1 && constantes.ObjectCooldown===0){\n document.getElementById(\"obj1\").style.transform = \"scale(0.9)\";\n audio = new Audio(hachasDestino);\n audio.play();\n newObj = \n {\n name: 'Hachas del Destino',\n image: document.getElementById(\"imgObj1\").src,\n attack: '9',\n defense: '-1'\n };\n created = 2;\n console.log(\"Hachas del destino forjadas!\");\n console.log(\"La muerte es como el viento... siempre a mi lado...\");\n sleep(1000).then(() => {\n document.getElementById(\"obj1\").style.transform = \"scale(1)\";\n }); \n }else if(constantes.ObjectCooldown===1){\n console.log('Espera para poder volver a crear un objeto!');\n }\n break;\n case 87:\n if(created===1 && constantes.ObjectCooldown===0){\n document.getElementById(\"obj2\").style.transform = \"scale(0.9)\";\n audio = new Audio(kunai);\n audio.play();\n newObj = \n {\n name: 'Kunai Represor',\n image: document.getElementById(\"imgObj2\").src,\n attack: '7',\n defense: '4'\n };\n created = 2;\n console.log(\"Kunai represor \");\n console.log(\"Nunca se tienen demasiados kunai...\");\n sleep(1000).then(() => {\n document.getElementById(\"obj2\").style.transform = \"scale(1)\";\n }); \n }else if(constantes.ObjectCooldown===1){\n console.log('Espera para poder volver a crear un objeto!');\n }\n break;\n case 69:\n if(created===1 && constantes.ObjectCooldown===0){\n document.getElementById(\"obj3\").style.transform = \"scale(0.9)\";\n audio = new Audio(lanza);\n audio.play();\n newObj = {\n name: 'Lanza Letal',\n image: document.getElementById(\"imgObj3\").src,\n attack: '10',\n defense: '0'\n };\n created = 2;\n console.log(\"Lanza letal forjada!\");\n console.log(\"Huye! Y la lanza encontrará tu espalda...\");\n sleep(1000).then(() => {\n document.getElementById(\"obj3\").style.transform = \"scale(1)\";\n }); \n }else if(constantes.ObjectCooldown===1){\n console.log('Espera para poder volver a crear un objeto!');\n }\n break;\n case 82:\n if(created===1 && constantes.ObjectCooldown===0){\n document.getElementById(\"obj4\").style.transform = \"scale(0.9)\";\n audio = new Audio(garras);\n audio.play();\n newObj = {\n name: 'Garras del inmortal',\n image: document.getElementById(\"imgObj4\").src,\n attack: '16',\n defense: '-4'\n };\n created = 2;\n console.log(\"Garras del inmortal forjadas!\");\n console.log(\"Hmmm.... Siente el poder de la naturaleza\");\n sleep(1000).then(() => {\n document.getElementById(\"obj4\").style.transform = \"scale(1)\";\n }); \n }else if(constantes.ObjectCooldown===1){\n console.log('Espera para poder volver a crear un objeto!');\n }\n break;\n case 84:\n if(created===1 && constantes.ObjectCooldown===0){\n document.getElementById(\"obj5\").style.transform = \"scale(0.9)\";\n audio = new Audio(sangre);\n audio.play();\n newObj = \n {\n name: 'Poción de sangre',\n image: document.getElementById(\"imgObj5\").src,\n attack: '8',\n defense: '0'\n }\n created = 2;\n console.log(\"Poción de sangre creada!\");\n console.log(\"Rojos se tornarán los rios\");\n sleep(1000).then(() => {\n document.getElementById(\"obj5\").style.transform = \"scale(1)\";\n }); \n }else if(constantes.ObjectCooldown===1){\n console.log('Espera para poder volver a crear un objeto!');\n }\n break;\n case 89:\n if(created===1 && constantes.ObjectCooldown===0){\n document.getElementById(\"obj6\").style.transform = \"scale(0.9)\";\n audio = new Audio(corrupcion);\n audio.play();\n newObj = \n {\n name: 'Poción de Rabia',\n image: document.getElementById(\"imgObj6\").src,\n attack: '0',\n defense: '8'\n }\n created = 2;\n console.log(\"Poción de Rabia creada!\");\n console.log(\"Esto puede doler...\");\n sleep(1000).then(() => {\n document.getElementById(\"obj6\").style.transform = \"scale(1)\";\n }); \n }else if(constantes.ObjectCooldown===1){\n console.log('Espera para poder volver a crear un objeto!');\n }\n break;\n case 187:\n if(created===1 && constantes.ObjectCooldown===0){\n audio = new Audio(muerte);\n audio.play();\n newObj = \n {\n name: 'Masacre a Porrazos',\n image: 'https://raw.githubusercontent.com/VXGamez/P2-PW/main/src/assets/objects/machuahuitl.svg?token=ALPT6YEGJSUHD2OT7SKUZLC77QYDC',\n attack: '60',\n defense: '60'\n }\n created = 2;\n console.log(\"Masacre a Porrazos forjada del inframundo...\");\n console.log(\"Vivo para dar muerte\");\n }else if(constantes.ObjectCooldown===1){\n console.log('Espera para poder volver a crear un objeto!');\n }\n break;\n default:\n break;\n }\n\n if(created===2){\n disableKeypresses();\n makeRequest('POST', 'http://battlearena.danielamo.info/api/craft/'+constantes.TOKEN+'/'+constantes.PLAYER_INFO.player_token, newObj)\n .then(function (datums) {\n makeRequest('GET', 'http://battlearena.danielamo.info/api/player/'+constantes.TOKEN+'/'+constantes.PLAYER_INFO.player_token, null)\n .then(function (datums) {\n var obj = JSON.parse(datums);\n \n var imagen = document.getElementById('selectedObject');\n imagen.src = obj.object.image;\n \n var nombreObjeto = document.getElementById('objectName'); \n nombreObjeto.textContent = obj.object.name;\n \n var ataqueObjeto = document.getElementById('objectAttack');\n ataqueObjeto.textContent = 'Ataque: ' + obj.object.attack;\n\n var defensaObjeto = document.getElementById('objectDefense');\n defensaObjeto.textContent = 'Defensa: ' + obj.object.defense;\n \n });\n })\n .catch(function (err){\n console.log('Error: ' + JSON.stringify(err));\n });\n created=0;\n }else if(created===3){\n makeRequest('GET', 'http://battlearena.danielamo.info/api/move/'+constantes.TOKEN+'/'+constantes.PLAYER_INFO.player_token + '/' +direction, null)\n .then(function (datums) {\n makeRequest('GET', 'http://battlearena.danielamo.info/api/player/'+constantes.TOKEN+'/'+constantes.PLAYER_INFO.player_token, null)\n .then(function (datums) {\n var obj = JSON.parse(datums);\n \n var xd = 'dir:'+obj.x+'-'+obj.direction;\n var yd = 'dir:'+obj.y+'-'+obj.direction;\n if((xd==='dir:0-O') || (xd==='dir:39-E') || (yd==='dir:0-S') || (yd==='dir:39-N')){\n document.getElementById(\"escena\").style.backgroundImage = 'url('+pared+')';\n }else{\n document.getElementById(\"escena\").style.backgroundImage = 'url('+noPared+')';\n }\n constantes.PLAYER_INFO.x = obj.x;\n constantes.PLAYER_INFO.y = obj.y;\n constantes.PLAYER_INFO.direction = obj.direction;\n });\n showMiniMap();\n findEnemy();\n })\n .catch(function (err){\n console.log('No puedes moverte en esta dirección: hay una pared!');\n document.getElementById(\"escena\").style.backgroundImage = 'url('+pared+')';\n });\n created=0;\n }\n\n}\n\n\n\nfunction disableKeypresses(){\n constantes.ObjectCooldown = 1;\n \n var obj1 = document.getElementById(\"obj1\");\n var objAnterior1 = obj1.innerHTML;\n var estilAnterior1 = obj1.style;\n obj1.opacity = '1';\n obj1.style.background = 'black';\n obj1.style.animation = 'cooldown 10s ease';\n\n var obj2 = document.getElementById(\"obj2\");\n var objAnterior2 = obj2.innerHTML;\n var estilAnterior2 = obj2.style;\n obj2.opacity = '1';\n obj2.style.background = 'black';\n obj2.style.animation = 'cooldown 10s ease';\n\n var obj3 = document.getElementById(\"obj3\");\n var objAnterior3 = obj3.innerHTML;\n var estilAnterior3 = obj3.style;\n obj3.opacity = '1';\n obj3.style.background = 'black';\n obj3.style.animation = 'cooldown 10s ease';\n \n var obj4 = document.getElementById(\"obj4\");\n var objAnterior4 = obj4.innerHTML;\n var estilAnterior4 = obj4.style;\n obj4.opacity = '1';\n obj4.style.background = 'black';\n obj4.style.animation = 'cooldown 10s ease';\n \n var obj5 = document.getElementById(\"obj5\");\n var objAnterior5 = obj5.innerHTML;\n var estilAnterior5 = obj5.style;\n obj5.opacity = '1';\n obj5.style.background = 'black';\n obj5.style.animation = 'cooldown 10s ease';\n\n var obj6 = document.getElementById(\"obj6\");\n var objAnterior6 = obj6.innerHTML;\n var estilAnterior6 = obj6.style;\n obj6.opacity = '1';\n obj6.style.background = 'black';\n obj6.style.animation = 'cooldown 10s ease';\n\n setTimeout(function(){\n obj1.innerHTML = objAnterior1;\n obj1.style = estilAnterior1;\n\n obj2.innerHTML = objAnterior2;\n obj2.style = estilAnterior2;\n\n obj3.innerHTML = objAnterior3;\n obj3.style = estilAnterior3;\n\n obj4.innerHTML = objAnterior4;\n obj4.style = estilAnterior4;\n\n obj5.innerHTML = objAnterior5;\n obj5.style = estilAnterior5;\n\n obj6.innerHTML = objAnterior6;\n obj6.style = estilAnterior6;\n\n\n constantes.ObjectCooldown = 0;\n },10000);\n \n}\n\n\n\nfunction helpAlert(){\n Swal.mixin({\n confirmButtonText: 'Siguiente →',\n icon: 'info',\n progressSteps: ['1', '2', '3']\n }).queue([\n {\n title: 'Cómo Jugar',\n html: '<h5>Bienvenido a nuestra practica de PW!</h5><p><br/>El juego consiste en recorrer un mapa, matando tantos enemigos como puedas!<br/><br/>Dírigete hacia tus enemigos con el minimapa y no pares hasta derrotarlos!</p>'\n },\n {\n title: 'Objetos',\n html: `<p>A lo largo de tu aventura vas a poder ir crafteando diferentes objetos que te van a ayudar a seguir matando enemigos y cada vez hacerte mas poderoso...<br/><br/>Recuerda que los objetos que puedes craftear son los que estan en la zona inferior izquierda y los consigues pulsando las teclas pertinentes (Q, W, E, R, T, Y).</p>\n <p>Tambien debes tener en cuenta que si te encuentras un objeto en la casilla en la que estas tambien lo puedes coger!<br/><br/><b>IMPORTANTE!</b> Solo puedes tener un objeto!</p>`\n },\n {\n title: 'Controles',\n text: 'Chaining swal2 modals is easy',\n html: \n `<p>Con las flechas del teclado mueves a tu jugador!<br/></p>\n <img src='https://www.flaticon.com/svg/static/icons/svg/2491/2491699.svg' alt=\"img\" style=\"width: 200px; height: 60px;\"/>\n <p><br/>Con el espacio atacas a los enemigos, <b>A por ellos!</b></p>\n <img src='https://userscontent2.emaze.com/images/116fcc9b-4071-4b73-9905-a74d7f865e36/cdcd0e7a-8986-4c3f-90cd-80308757aaa8.png' alt=\"img\" style=\"width: 300px; height: 60px;\"/>` \n }\n ]).then((result) => {\n if (result.value) {\n Swal.fire(\n 'Buen Trabajo!',\n 'Ahora a jugar ;)',\n 'success'\n )\n }\n });\n}\n\nfunction App() {\n return (\n <div className=\"App\">\n\n <img id=\"imagenFondo\" src={papeliko} className=\"imagenFondo\" alt=\"imagen de fondo\" />\n <img id=\"imagenFondoDerecha\" src={papeliko} className=\"imagenFondoDerecha\" alt=\"imagen de fondo\" />\n\n\n <header id=\"header\" className=\"App-header\">\n <div className=\"header\">\n \n\n <img src={logo} className=\"logo\" alt='logo' height='70px'/>\n <div className=\"siteTitle\">\n <h4>Practica 2</h4>\n <h6>Marti Ejarque · Rafael Morera · Victor Xirau</h6>\n </div>\n <Button variant=\"outline-light\" onClick={helpAlert}>Ayuda</Button>{' '}\n <Button variant=\"outline-danger\" onClick={eliminarJugador}>Salir de Partida</Button>{' '}\n <Button variant=\"outline-success\" onClick={alertNovaPartida}>Nueva Partida</Button>{' '}\n\n \n\n </div>\n <div className=\"mapa\">\n <img className=\"marquito\" src={marco} alt=\"marquito\"/>\n <div className=\"escena\" id=\"escena\"></div>\n <div className=\"enemigo\" id=\"eneimgo\">\n \n <img id=\"enemyAct\" src=\"//:0\" alt=\"\" style={{width: '100%', height: '100%', display:\"none\"}}/>\n </div>\n \n \n <div className=\"bruju\" id=\"bruju\">\n \n <div className=\"nord\">\n <img src={nord} alt=\"nord\" style={{width:'55%', height:'55%'}}/>\n </div>\n\n <div className=\"sud\">\n <img src={sud} alt=\"sud\" style={{width:'55%', height:'55%'}}/>\n </div>\n\n <div className=\"oest\">\n <img src={oeste} alt=\"oeste\" style={{width:'55%', height:'55%'}}/>\n </div>\n\n <div className=\"est\">\n <img src={este} alt=\"este\" style={{width:'55%', height:'55%'}}/>\n </div>\n\n <div className=\"imgBruju\" id=\"bruhula\">\n <img id=\"imgBruju\" src={brujuNord} alt=\"bruju\" style={{width: '70%', height: '70%'}}/>\n </div> \n </div>\n \n\n </div>\n \n \n <div className=\"player\" id=\"player\">\n \n </div>\n <div className=\"terminal\" id=\"terminal\" >\n <h3>TERMINAL</h3>\n <div className=\"log\" id=\"log\">\n\n </div>\n </div>\n <div className=\"control\" id=\"control\">\n <div className=\"up\" id=\"up\"> \n <img src={up} alt='up' style={{marginTop:'10%',height: \"100%\",width: \"100%\", display:'block'}}/> \n </div>\n <div className=\"down\" id=\"down\"> \n <img src={down} alt='down' style={{height: \"100%\",width: \"100%\", display:'block'}}/> \n </div>\n <div className=\"left\" id=\"left\"> \n <img src={left} alt=\"left\" style={{marginLeft:'33%',height: \"100%\",width: \"100%\", display:'block'}}/> \n </div>\n <div className=\"right\" id=\"right\"> \n <img src={right} alt=\"right\" style={{marginLeft:'-33%',height: \"100%\",width: \"100%\", display:'block'}}/> \n </div>\n <div className=\"space\" id=\"space\">\n <img src={space} alt=\"space\" style={{height: \"100%\", width: \"100%\",display:'block'}}/> \n </div>\n\n </div>\n\n <div className=\"mini\" id=\"mini\">\n <canvas className=\"miniMapa\" id=\"myCanvas\" width=\"100%\" height=\"100%\"></canvas>\n </div>\n \n \n <div className=\"stats\" id=\"stats\">\n <div className=\"ataque\" id=\"ataque\">\n <h4 style={{color: 'black', marginRight: '2%', fontSize: '4vh'}}>Ataque:</h4>\n <p id=\"atk\">--</p>\n <img src= {espadas} style={{width: '10%', marginLeft: '5%'}} alt=\"espadas\"/>\n </div>\n <div className=\"defensa\" id=\"defensa\">\n <h4 style={{color: 'black', marginRight: '2%', fontSize: '4vh'}}>Defensa:</h4>\n <p id=\"df\">--</p>\n <img src= {escudo} style={{width: '10%', marginLeft: '5%'}} alt=\"escudo\"/>\n </div>\n </div>\n\n \n <div className=\"objetos\" id=\"objetos\">\n <div id=\"obj1\" className=\"obj1\">\n <img id=\"imgObj1\" src=\"https://raw.githubusercontent.com/VXGamez/P2-PW/main/src/assets/objects/axe.svg?token=ALPT6YAHZPFG6CIJQ5ZXXY277NEO2\" alt=\"obj1\" width=\"100%\"/>\n <p className=\"objectTitle\">Hachas del destino (Q)</p>\n <p>Ataque : 9</p>\n <p>Defensa : -1</p>\n </div>\n <div id=\"obj2\" className=\"obj2\">\n <img id=\"imgObj2\" src=\"https://raw.githubusercontent.com/VXGamez/P2-PW/main/src/assets/objects/kunai.svg?token=ALPT6YE3XKRBYDZIKYFGFPS77NET6\" alt=\"obj2\" width=\"100%\"/>\n <p className=\"objectTitle\">Kunai Represor (W)</p>\n <p>Ataque : 7</p>\n <p>Defensa : 4</p>\n </div>\n <div id=\"obj3\" className=\"obj3\">\n <img id=\"imgObj3\" src=\"https://raw.githubusercontent.com/VXGamez/P2-PW/main/src/assets/objects/spear.svg?token=ALPT6YCQJB627XIZ6Q2COTC77NEUS\" alt=\"obj3\" width=\"100%\"/>\n <p className=\"objectTitle\">Lanza Letal (E)</p>\n <p>Ataque : 10</p>\n <p>Defensa : 0</p>\n </div>\n <div id=\"obj4\" className=\"obj4\">\n <img id=\"imgObj4\" src=\"https://raw.githubusercontent.com/VXGamez/P2-PW/main/src/assets/objects/weapon.svg?token=ALPT6YHHTINJ635FRSINDP277NEVE\" alt=\"obj4\" width=\"100%\"/>\n <p className=\"objectTitle\">Garras Inmortales (R)</p>\n <p>Ataque : 16</p>\n <p>Defensa : -4</p>\n </div>\n <div id=\"obj5\" className=\"obj5\">\n <img id=\"imgObj5\" src=\"https://raw.githubusercontent.com/VXGamez/P2-PW/main/src/assets/objects/attackPotion.svg?token=ALPT6YDY2XSYIMEV7M3JLC277NEB2\" alt=\"obj5\"width=\"100%\"/>\n <p className=\"objectTitle\">Poción Sangre (T)</p>\n <p>Ataque : 8</p>\n <p>Defensa : 0</p>\n </div>\n <div id=\"obj6\" className=\"obj6\">\n <img id=\"imgObj6\" src=\"https://raw.githubusercontent.com/VXGamez/P2-PW/main/src/assets/objects/defensePotion.svg?token=ALPT6YCLUDVO7BEY3JEG6CK77NEFI\" alt=\"obj6\" width=\"100%\"/>\n <p className=\"objectTitle\">Poción Rabia (Y)</p>\n <p>Ataque : 0</p>\n <p>Defensa : 8</p>\n </div>\n </div> \n\n </header>\n </div>\n );\n}\n\n\nexport default App;\n","/Users/victorxirauguardans/Desktop/UNI/PW/Practica2/P2-PW/src/assets/index.js",[],"/Users/victorxirauguardans/Desktop/UNI/PW/Practica2/P2-PW/src/assets/avatars/index.js",[],["28","29"],"/Users/victorxirauguardans/Desktop/UNI/PW/Practica2/P2-PW/src/assets/audio/index.js",[],{"ruleId":"30","replacedBy":"31"},{"ruleId":"32","replacedBy":"33"},{"ruleId":"34","severity":1,"message":"35","line":189,"column":9,"nodeType":"36","messageId":"37","endLine":189,"endColumn":15},{"ruleId":"30","replacedBy":"38"},{"ruleId":"32","replacedBy":"39"},"no-native-reassign",["40"],"no-negated-in-lhs",["41"],"no-unused-vars","'reborn' is assigned a value but never used.","Identifier","unusedVar",["40"],["41"],"no-global-assign","no-unsafe-negation"]