update single-card utility with colors and recursion tweaks
This commit is contained in:
parent
847b9ec6d6
commit
6d0d543f00
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue