deck.nv
· 588 B · Text
Sin formato
Playground
||:: form a deck :suits: (spades hearts diamonds clubs)
:ranks: (2 3 4 5 6 7 8 9 jack queen king ace)
|:: form a deck? :suits: $suit|
:: match $suit to a rank
:used suits: $suit
|:: form a deck|
:: reset suits
|:: match $suit to a rank? :ranks: $rank|
:: create a $suit $rank card
:used ranks: $rank
|:: match $suit to a rank|
:: reset ranks
|:: create a $suit $rank card|
:deck: $rank of $suit
|:: reset ranks? :used ranks: $rank|
:ranks: $rank
|:: reset ranks|
|:: reset suits? :used suits: $suit|
:suits: $suit
|:: reset suits|
| 1 | ||:: form a deck :suits: (spades hearts diamonds clubs) |
| 2 | :ranks: (2 3 4 5 6 7 8 9 jack queen king ace) |
| 3 | |
| 4 | |:: form a deck? :suits: $suit| |
| 5 | :: match $suit to a rank |
| 6 | :used suits: $suit |
| 7 | |:: form a deck| |
| 8 | :: reset suits |
| 9 | |
| 10 | |:: match $suit to a rank? :ranks: $rank| |
| 11 | :: create a $suit $rank card |
| 12 | :used ranks: $rank |
| 13 | |:: match $suit to a rank| |
| 14 | :: reset ranks |
| 15 | |
| 16 | |:: create a $suit $rank card| |
| 17 | :deck: $rank of $suit |
| 18 | |
| 19 | |:: reset ranks? :used ranks: $rank| |
| 20 | :ranks: $rank |
| 21 | |:: reset ranks| |
| 22 | |
| 23 | |:: reset suits? :used suits: $suit| |
| 24 | :suits: $suit |
| 25 | |:: reset suits| |