Playing cards: Difference between revisions
Content added Content deleted
m (fix bare <lang> tags) |
|||
Line 369: | Line 369: | ||
//free(d); |
//free(d); |
||
return 0; |
return 0; |
||
}</lang>output< |
}</lang>output<pre>New deck, 52 cards: ♠A ♠2 ♠3 ♠4 ♠5 ♠6 ♠7 ♠8 ♠9 ♠10 ♠J ♠Q ♠K ♥A ♥2 ... |
||
Shuffle and deal to three players: |
Shuffle and deal to three players: |
||
Line 375: | Line 375: | ||
♥3 ♠5 ♣5 ♠A ♦6 |
♥3 ♠5 ♣5 ♠A ♦6 |
||
♣8 ♥J ♠4 ♠3 ♣A |
♣8 ♥J ♠4 ♠3 ♣A |
||
Left in deck 37 cards: ♥8 ♣10 ♣K ♦2 ♦A ♥10 ♥6 ♥Q ♠6 ♦4 ♥9 ♠9 ♣6 ♦K ♦8 ♠7 ♣7 ♠K ♠2 ♣4 ...</ |
Left in deck 37 cards: ♥8 ♣10 ♣K ♦2 ♦A ♥10 ♥6 ♥Q ♠6 ♦4 ♥9 ♠9 ♣6 ♦K ♦8 ♠7 ♣7 ♠K ♠2 ♣4 ...</pre> |
||
See also [[Playing Cards/C]] |
See also [[Playing Cards/C]] |
||
Line 2,254: | Line 2,254: | ||
(newline)</lang> |
(newline)</lang> |
||
Sample output: |
Sample output: |
||
< |
<pre>((jack . hearts) (5 . clubs) (9 . hearts) (7 . clubs) (6 . spades))</pre> |
||
=={{header|Smalltalk}}== |
=={{header|Smalltalk}}== |
||
{{works with|GNU Smalltalk}} |
{{works with|GNU Smalltalk}} |