mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-10 04:09:29 +02:00
fixed bug with saper
This commit is contained in:
@@ -284,44 +284,46 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async amountCrystals(CrystalsCount) {
|
async amountCrystals(CrystalsCount) {
|
||||||
this.PercentageGameSteps = []
|
setTimeout(async () => {
|
||||||
if (![1, 5, 10, 24].includes(CrystalsCount)) {
|
this.PercentageGameSteps = []
|
||||||
this.clickedBtnCrystal = null
|
if (![1, 5, 10, 24].includes(CrystalsCount)) {
|
||||||
}
|
this.clickedBtnCrystal = null
|
||||||
else {
|
}
|
||||||
let index
|
else {
|
||||||
switch (CrystalsCount) {
|
let index
|
||||||
case 1:
|
switch (CrystalsCount) {
|
||||||
index = 0
|
case 1:
|
||||||
break
|
index = 0
|
||||||
case 5:
|
break
|
||||||
index = 1
|
case 5:
|
||||||
break
|
index = 1
|
||||||
case 10:
|
break
|
||||||
index = 2
|
case 10:
|
||||||
break
|
index = 2
|
||||||
case 24:
|
break
|
||||||
index = 3
|
case 24:
|
||||||
break
|
index = 3
|
||||||
|
break
|
||||||
|
}
|
||||||
|
this.clickedBtnCrystals(index, CrystalsCount)
|
||||||
}
|
}
|
||||||
this.clickedBtnCrystals(index, CrystalsCount)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (CrystalsCount >= 1 && CrystalsCount <= 24) {
|
if (CrystalsCount >= 1 && CrystalsCount <= 24) {
|
||||||
try {
|
try {
|
||||||
await GetPercentageSteps(this.amountCrystals)
|
await GetPercentageSteps(this.amountCrystals)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
response.forEach((item) => {
|
response.forEach((item) => {
|
||||||
if (item !== 'Infinity' && item !== '-Infinity') {
|
if (item !== 'Infinity' && item !== '-Infinity') {
|
||||||
this.PercentageGameSteps.push(Number(item))
|
this.PercentageGameSteps.push(Number(item))
|
||||||
}
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
}
|
||||||
}
|
catch (e) {
|
||||||
catch (e) {
|
|
||||||
console.error('Error in Percantage', e)
|
console.error('Error in Percantage', e)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}, 200)
|
||||||
},
|
},
|
||||||
flippedCards: {
|
flippedCards: {
|
||||||
async handler(value) {
|
async handler(value) {
|
||||||
|
|||||||
Reference in New Issue
Block a user