Closed gricha2380 closed 6 years ago
When populating deck, check for locked status from level object. loop through here: [currentmode]["levels"][currentlevel]["deck"]["locked"]
[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.
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).