filterByColor

fun List<Card>.filterByColor(vararg colors: String): List<Card>

Filters cards by exact color identity. Returns only cards that have ALL specified colors (and only those colors).

Return

List of cards with the exact color identity

Example:

val redGreen = cards.filterByColor("R", "G")

Parameters

colors

Variable number of color codes (W, U, B, R, G)