Skip to content

Instantly share code, notes, and snippets.

@cecimerelo
Created January 8, 2017 11:05
Show Gist options
  • Save cecimerelo/67e3a1c3fd8c0aeb173563471c390c29 to your computer and use it in GitHub Desktop.
Save cecimerelo/67e3a1c3fd8c0aeb173563471c390c29 to your computer and use it in GitHub Desktop.
We have crete a program in Perl 6, in which we can pick a card and shuffle the deck of cards over and over again.

PLAYING CARDS


Here we have the code of the program. <((1,2,3,4,5,6,7,8,9,10,'J','Q','K') X ("♠","♥","♦","♣")).roll> <((1,2,3,4,5,6,7,8,9,10,'J','Q','K') X ("♠","♥","♦","♣")).pick(52)>

<roll> is used for picking any card randomly. <pick(52)> is used for shuffeling all the deck of cards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment