Deal cards for FreeCell: Difference between revisions
J: rephrase to more closely match task description
No edit summary |
(J: rephrase to more closely match task description) |
||
Line 107:
Paraphrase of C:
<lang j>deck=: ,/ '
seed=: do bind 'SEED'▼
srnd=: 3 :'SEED=:{.y,11982'
srnd ''
▲seed=: do bind 'SEED'
rnd=: (2^16) <.@%~ (2^31) srnd@| 2531011 + 214013 * seed
pairs=:
swaps=: [: > C.&.>/@|.@; NB.
deal=: |.@(swaps pairs
show=: (,"2)@:(_8 ]\ ' '&,.)</lang>
|