gricha2380 / regex

https://gricha2380.github.io/regex/demo
0 stars 0 forks source link

Add locked card mechanism #32

Closed gricha2380 closed 6 years ago

gricha2380 commented 6 years ago

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 6 years ago

Something like this:


if(deck.indexOf(currentCard.name) != -1) {
renderDisabledStuff();
}```
gricha2380 commented 6 years ago

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