cleanup code
This commit is contained in:
parent
bc9d4aa5bc
commit
9046b2ad43
|
@ -1,8 +1,6 @@
|
||||||
mode = 'PLAY'
|
mode = 'PLAY'
|
||||||
allData = {}
|
allData = {}
|
||||||
total = 0
|
total = 0
|
||||||
probList = []
|
|
||||||
nameList = []
|
|
||||||
weightedCards = []
|
weightedCards = []
|
||||||
indWeighedCards = 0
|
indWeighedCards = 0
|
||||||
k = 12
|
k = 12
|
||||||
|
@ -57,10 +55,6 @@ function putIntoMapAndFetch(data) {
|
||||||
total = newArtistData[1]
|
total = newArtistData[1]
|
||||||
}
|
}
|
||||||
for (const [key, value] of Object.entries(allData)) {
|
for (const [key, value] of Object.entries(allData)) {
|
||||||
nameList.push(key)
|
|
||||||
probList.push(
|
|
||||||
value.length + (probList.length === 0 ? 0 : probList[probList.length - 1])
|
|
||||||
)
|
|
||||||
for (let j = 0; j < value.length; j++) {
|
for (let j = 0; j < value.length; j++) {
|
||||||
weightedCards.push(key)
|
weightedCards.push(key)
|
||||||
}
|
}
|
||||||
|
@ -68,8 +62,6 @@ function putIntoMapAndFetch(data) {
|
||||||
shuffleArray(weightedCards)
|
shuffleArray(weightedCards)
|
||||||
window.console.log(allData)
|
window.console.log(allData)
|
||||||
window.console.log(total)
|
window.console.log(total)
|
||||||
window.console.log(probList)
|
|
||||||
window.console.log(nameList)
|
|
||||||
if (whichGuesser === 'counterspell') {
|
if (whichGuesser === 'counterspell') {
|
||||||
document.getElementById('guess-type').innerText = 'Counterspell Guesser'
|
document.getElementById('guess-type').innerText = 'Counterspell Guesser'
|
||||||
} else if (whichGuesser === 'burn') {
|
} else if (whichGuesser === 'burn') {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user