Is there a good way to produce the remainder of a deal?
Opened this issue · 0 comments
HighDiceRoller commented
Options:
Status quo
@map_function
def my_function(hand):
remainder = initial_deck - hand
x = remainder.deal(3)
# ...
result = my_function(deck.deal(5))
Ellipsis
Use ...
to represent the remaining cards.
hand_and_remainder = deck.deal(5, ...)
This doesn't play great with map_function
, unless we allow arguments to take multiple slots. Also, presumably the user would have to cast the remainder back to a Deck
:
@map_function
def my_function(hand, remainder):
remainder = Deck(remainder)
x = remainder.deal(3)
# ...
result = my_function(deck.deal(5, ...))