#Ai failed at Secret Tunnel
9 messages · Page 1 of 1 (latest)
I'll look into it 🙂 What would be the optimal way these days to detect two creatures with a shared type on the battlefield without going through all the permutations in a loop (if there is a way)?
Dunno if there's already a function to do it, but dump all the applicable permanents into a multimap that maps card-subtype to cards, then look at the keys with more than one value.
Filter out all 'all creature types' first
Good catch. If any of those exist then you could keep them separate until you build the map, then add them to each existing key afterwards?
Though then you also need to handle the edge case where there's only all-creature-types creatures.
May be best to just consider them separately.
: Add
.
,