Jump to content

Set puzzle: Difference between revisions

→‎{{header|Tailspin}}: use cartesian product syntax
(Add Rust implementation)
(→‎{{header|Tailspin}}: use cartesian product syntax)
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.
<lang tailspin>
def deck: [ { by 1..3 -> \(def colour: $;),
by 1..3 -> \(def symbol: $;),
by 1..3 -> \(def number: $;),
by 1..3 -> {colour: $colour, symbol: $symbol, number: $number, (shading: $)} !
\) !
\) !
\)
];
 
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.