Playing cards: Difference between revisions
Content added Content deleted
(Added implementation for PHP) |
(→{{header|PHP}}: changed Deck::deal() to deal FIFO in stead of LIFO) |
||
Line 2,205: | Line 2,205: | ||
} |
} |
||
return new CardCollection( array_splice( $this->cards, |
return new CardCollection( array_splice( $this->cards, 0, $amount ) ); |
||
} |
} |
||
Line 2,252: | Line 2,252: | ||
52 cards in the new deck, shuffled: |
52 cards in the new deck, shuffled: |
||
♣5 ♥6 ♠3 ♥9 ♥7 ♥Q ♠J ♠4 ♦7 ♣Q ♣4 ♠9 ♦A ♠Q ♦J ♦9 ♠K ♥A ♥T ♦Q ♥K ♥8 ♣6 ♥2 ♠5 ♠A ♦8 ♣A ♥4 ♣K ♣9 ♠7 ♥J ♠T ♦2 ♣7 ♣T ♦K ♣8 ♣2 ♥5 ♦T ♥3 ♠8 ♠6 ♣J ♦5 ♣3 ♦3 ♠2 ♦4 ♦6 |
|||
Player 1 got dealt the following 4 cards: |
Player 1 got dealt the following 4 cards: ♣5 ♥6 ♠3 ♥9 |
||
Player 2 got dealt the following 4 cards: |
Player 2 got dealt the following 4 cards: ♥7 ♥Q ♠J ♠4 |
||
Player 3 got dealt the following 4 cards: |
Player 3 got dealt the following 4 cards: ♦7 ♣Q ♣4 ♠9 |
||
Player 4 got dealt the following 4 cards: |
Player 4 got dealt the following 4 cards: ♦A ♠Q ♦J ♦9 |
||
36 cards remaining in the deck: |
36 cards remaining in the deck: |
||
♠K ♥A ♥T ♦Q ♥K ♥8 ♣6 ♥2 ♠5 ♠A ♦8 ♣A ♥4 ♣K ♣9 ♠7 ♥J ♠T ♦2 ♣7 ♣T ♦K ♣8 ♣2 ♥5 ♦T ♥3 ♠8 ♠6 ♣J ♦5 ♣3 ♦3 ♠2 ♦4 ♦6</pre> |
|||
=={{header|PicoLisp}}== |
=={{header|PicoLisp}}== |