Add locked card mechanism
Closed this issue · 2 comments
gricha2380 commented
When populating deck, check for locked status from level object. loop through here:
[currentmode]["levels"][currentlevel]["deck"]["locked"]
if locked, pass class to .cardHolder and .card
Add additional condition to .card event listener to disable click if lock is present. (still allow info button to be pressed).
gricha2380 commented
Something like this:
if(deck.indexOf(currentCard.name) != -1) {
renderDisabledStuff();
}```
gricha2380 commented
Done. Info button can be accessed for locked cards but the cards themselves cannot be played.