{"version":3,"file":"frontend_export.bundle.js","mappings":"wCAwBA,SAAgBA,EAAiBC,GAG7B,OAAO,IAAM,WAAKA,EACtB,C,wJAvBa,EAAAC,YAAkB,IAClB,EAAAC,cAAoB,GAEjC,wCACI,KAAAF,MAAe,EACf,KAAAG,GAAS,CAWb,CATIC,OAAOD,GACHE,KAAKF,IAAMA,EACX,IAAIG,EAAaP,EAAiBM,KAAKL,OACnCK,KAAKF,IAAMG,IACXD,KAAKF,IAAMG,EACXD,KAAKL,OAAS,EAEtB,GAKJ,qBAMA,oCAAyCA,GAIrC,OAAQ,IAAM,WAAMA,EAAQ,GAAMO,KAAKC,GAC3C,C,GClCIC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaE,QAGrB,IAAIC,EAASN,EAAyBE,GAAY,CAGjDG,QAAS,CAAC,GAOX,OAHAE,EAAoBL,GAAUI,EAAQA,EAAOD,QAASJ,GAG/CK,EAAOD,OACf,C,MCtBA,iBAOCG,OAAelB,iBAAmB,EAAAA,iBAClCkB,OAAeC,yBAA2B,EAAAA,wB","sources":["webpack://spacegame/./source/profile/Progression.ts","webpack://spacegame/webpack/bootstrap","webpack://spacegame/./source/frontend_export.ts"],"sourcesContent":["\nexport type Level = number;\nexport type Xp = number;\n\n\nexport const XP_PER_KILL: Xp = 100;\nexport const XP_PER_ASSIST: Xp = 50;\n\nexport class PlayerProgression {\n level: Level = 0;\n xp: Xp = 0;\n\n giveXp(xp: Xp) {\n this.xp += xp;\n let next_level = getMaxXpForLevel(this.level);\n if (this.xp >= next_level) {\n this.xp -= next_level;\n this.level += 1;\n }\n }\n\n}\n\n\nexport function getMaxXpForLevel(level: Level): Xp {\n\n // f(x) = 500*2^x\n return 500 * 2 ** level;\n}\n\nexport function getTotalXpEarnedForLevel(level: Level): Xp {\n\n // max = 500*2^x\n // int(max) = F(x) = (125*2^(x+2))/ln(2)\n return (125 * 2 ** (level + 2)) / Math.LN2;\n}\n\n\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","import { getMaxXpForLevel, getTotalXpEarnedForLevel } from \"./profile/Progression\";\n\n\n\n\n\n\n(window as any).getMaxXpForLevel = getMaxXpForLevel;\n(window as any).getTotalXpEarnedForLevel = getTotalXpEarnedForLevel;"],"names":["getMaxXpForLevel","level","XP_PER_KILL","XP_PER_ASSIST","xp","giveXp","this","next_level","Math","LN2","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","window","getTotalXpEarnedForLevel"],"sourceRoot":""}