tryFind method
Looks up a card in this collection by its orderInSet
.
If the card is not found, returns null
.
NOTE: This method is not highly optimized.
Implementation
Card? tryFind(int orderInSet) {
for (final card in cards) {
if (card.orderInSet == orderInSet) {
return card;
}
}
return null;
}