Set, the card game: Difference between revisions
m
→{{header|Quackery}}
Line 406:
<code>comb</code> and <code>arrange</code> are defined at [[Combinations#Quackery]].
<syntaxhighlight lang="Quackery"> [ true swap transpose witheach
[ 0 swap witheach +
3 mod
[ [ [] 81 times
[ i 4 times [ 3 /mod swap ]
nested join ] ] constant
shuffle swap split drop ] is cards ( n --> [ )
[ [] swap dup size swap 3 rot comb
witheach
[ dip dup arrange
dup isset iff
[ nested rot join swap ]
else drop ] drop
[ unpack dup dip
Line 448 ⟶ 440:
$ "squiggle"
$ "oval" ] do echo$ ]
[ dup cards swap
cr say "Cards dealt: " echo cr cr
dup witheach echocard cr
sets dup size
say "Sets present: " echo cr cr
witheach
' [ 4 8 12 ] witheach [ play say "-----" ]</syntaxhighlight>
{{out}}
|