I have multiple locations for cards in my deck and I would like to move all the card from all the location back to the deck.
I'm lucky that all those cards are of the same type, so this seem to be working well
But for getCardsOfType, it it written in the wiki as "rarely use". Is there a better way ? Would there be a way if all the card where of a different type ?
I'm lucky that all those cards are of the same type, so this seem to be working well
Code: Select all
$distributedCards = array_map(function($card){ return $card['id']; }, $this->maptiles_deck->getCardsOfType( 'mapTiles' ));
$this->maptiles_deck->moveCards($distributedCards , 'maptiles_deck');