reduce unnecessary recursion on face cards cards

This commit is contained in:
xenofem 2022-07-27 08:43:43 -04:00
parent f32775a63e
commit 4c27ad0aab

View file

@ -10,6 +10,10 @@ for (int suit = 0; suit <= 5; ++suit) {
// due to exponential growth, with the larger suit icon on the 1
// card, the endpoint of the recursion is a *lot* more visible
fill(recursive_card(value, suit, 6), evenodd+red);
} else if (suit == CARDS && value > 6) {
// conversely, face cards don't need as much recursion depth
// because the only icons present are significantly smaller
fill(recursive_card(value, suit, 3), evenodd+red);
} else {
fill(recursive_card(value, suit), evenodd+red);
}