Last active
December 10, 2015 22:38
-
-
Save nisbus/4503947 to your computer and use it in GitHub Desktop.
This results in a list of cards and one extra element (_Gxxxx)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deal(0,_,_). | |
deal(NumCards,Deck,Out) :- | |
get_card(C,Deck,Rest), | |
NewNum is NumCards-1, | |
append(Out,[C],Result), | |
deal(NewNum,Rest,Result), | |
Out = [C|Result],!. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment