added logic for card-count

This commit is contained in:
Kostya
2024-01-28 23:00:55 +03:00
parent 98a4399644
commit 3e8c5268fc
2 changed files with 14 additions and 9 deletions

View File

@@ -132,8 +132,8 @@
<h2>Изумруды</h2>
<p>Открывай ячейки с изумрудами</p>
<img src="@/assets/icons-games/saper-game/icon-emeralds-saper.svg" width="170" height="170">
<div class="info-crystals__count card-style-count emeralds-bg">
<h3>22</h3>
<div class="info-crystals__count card-style-count emeralds-bg" :class="{ 'on-element-card' : gameStart === true }">
<h3>{{ this.emeraldsAmount }}</h3>
</div>
</div>
</div>
@@ -142,8 +142,8 @@
<h2>кристаллы</h2>
<p>Остерегайся кристаллов, чтобы не проиграть</p>
<img src="@/assets/icons-games/saper-game/icon-crystall-info-saper.svg" width="170" height="170">
<div class="info-crystals__count card-style-count crystals-bg">
<h3>3</h3>
<div class="info-crystals__count card-style-count crystals-bg" :class="{ 'on-element-card' : gameStart === true }">
<h3>{{ this.amountCrystals }}</h3>
</div>
</div>
</div>
@@ -197,6 +197,7 @@ export default {
clickedBtn: '',
clickedBtnCrystal : '',
amountCrystals: 0,
emeraldsAmount: 0,
balance: 0,
winningAmount: 0,
gamesCircle: 0,
@@ -322,6 +323,7 @@ export default {
this.CorrectsClick.push(X_Cordinates)
SoundUncorrect.play()
this.emeraldsAmount--
}
if (this.gamesCircle === maxCircles) {
this.offEventPointers = false
@@ -402,6 +404,7 @@ export default {
})
soundStartGame.play()
this.emeraldsAmount = 25 - this.amountCrystals
}
},
getBalanceUser() {