Set puzzle: Difference between revisions
Content added Content deleted
(Add Rust implementation) |
(→{{header|Tailspin}}: use cartesian product syntax) |
||
Line 3,940: | Line 3,940: | ||
Dealing cards at random to the size of the desired hand, then trying again if the desired set count is not achieved. |
Dealing cards at random to the size of the desired hand, then trying again if the desired set count is not achieved. |
||
<lang tailspin> |
<lang tailspin> |
||
def deck: [ 1..3 -> |
def deck: [ { by 1..3 -> (colour: $), |
||
1..3 -> |
by 1..3 -> (symbol: $), |
||
1..3 -> |
by 1..3 -> (number: $), |
||
1..3 -> |
by 1..3 -> (shading: $)} |
||
\) ! |
|||
\) ! |
|||
\) |
|||
]; |
]; |
||