From 6d0d543f00f5211ffa95e9b01509dfb28dcd9251 Mon Sep 17 00:00:00 2001 From: xenofem Date: Wed, 27 Jul 2022 08:53:49 -0400 Subject: [PATCH] update single-card utility with colors and recursion tweaks --- single-card.asy | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/single-card.asy b/single-card.asy index 5cef1c6..ca85bb0 100644 --- a/single-card.asy +++ b/single-card.asy @@ -1,14 +1,22 @@ import "cards.asy" as cards; import "numerals.asy" as numerals; +import "suits.asy" as suits; -int suit = WHEELS; -int value = 1; +int suit = PUPPETS; +int value = 5; filldraw(card, white, black); +currentpen = evenodd+suit_colors[suit]; + if (suit == CARDS && value == 1) { // 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); + fill(recursive_card(value, suit, 6)); +} 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)); } else { - fill(recursive_card(value, suit), evenodd+red); + //fill(recursive_card(value, CARDS, 1), evenodd+lightgrey); + fill(recursive_card(value, suit); }