Playing cards: Difference between revisions

Content added Content deleted
(Replaced by a more complete version usable for other tasks ans compatible with Nim 1.4.)
m (Corrected a spelling mistake.)
Line 4,024: Line 4,024:
echo "Remaining cards: ", deck
echo "Remaining cards: ", deck


echo "\nAfter player 1 drawn a card from the deck: "
echo "\nAfter player 1 drew a card from the deck: "
hands[0].add deck.draw()
hands[0].add deck.draw()
echo "Player 1 hand: ", hands[0]
echo "Player 1 hand: ", hands[0]
Line 4,044: Line 4,044:
Remaining cards: A♦ Q♣ 2♣ A♥ 10♣ 3♠ Q♦ 7♦ A♣ 4♠ 9♥ 4♦
Remaining cards: A♦ Q♣ 2♣ A♥ 10♣ 3♠ Q♦ 7♦ A♣ 4♠ 9♥ 4♦


After player 1 drawn a card from the deck:
After player 1 drew a card from the deck:
Player 1 hand: 5♥ 4♥ 2♠ Q♥ 5♦ 3♣ 8♦ 6♦ 4♦
Player 1 hand: 5♥ 4♥ 2♠ Q♥ 5♦ 3♣ 8♦ 6♦ 4♦
Remaining cards: A♦ Q♣ 2♣ A♥ 10♣ 3♠ Q♦ 7♦ A♣ 4♠ 9♥</pre>
Remaining cards: A♦ Q♣ 2♣ A♥ 10♣ 3♠ Q♦ 7♦ A♣ 4♠ 9♥</pre>