gricha2380/regex

Add locked card mechanism

Closed this issue · 2 comments

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).

Something like this:

if(deck.indexOf(currentCard.name) != -1) {
renderDisabledStuff();
}```

Done. Info button can be accessed for locked cards but the cards themselves cannot be played.