Playing cards: Difference between revisions
m
→{{header|J}}: <nowiki> tags no longer required
m (→{{header|J}}: <nowiki> tags no longer required) |
|||
Line 1,094:
DeckPrototype=: |. ,/(i.#N0),."1 0 i.#N1
sayCards=: ((N0{~{.),' of ',(N1{~{:))"1
startNewDeck
)
Line 1,127:
<lang j> load 'coutil'
load 'c:\documents and settings\user_name\j602-user\playingcards.ijs'
pc=:
$TheDeck__pc
52 2
shuffle__pc
1
sayCards__pc 2 dealCards__pc 5 NB. deal two hands of five cards
Line 1,146:
$TheDeck__pc NB. deck size has been reduced by the ten cards dealt
42 2
destroy__pc
1</lang>
|