Set puzzle: Difference between revisions
Content added Content deleted
(Added Easylang) |
|||
Line 1,504: | Line 1,504: | ||
. |
. |
||
. |
. |
||
proc |
proc printcards cards[] . . |
||
for card in cards[] |
for card in cards[] |
||
card2attr card attr[] |
card2attr card attr[] |
||
Line 1,514: | Line 1,514: | ||
print "" |
print "" |
||
. |
. |
||
proc |
proc getsets . cards[] set[] . |
||
set[] = [ ] |
set[] = [ ] |
||
for i to len cards[] |
for i to len cards[] |
||
Line 1,549: | Line 1,549: | ||
len pack[] -1 |
len pack[] -1 |
||
. |
. |
||
getsets cards[] set[] |
|||
until len set[] = 3 * nsets |
until len set[] = 3 * nsets |
||
. |
. |
||
print "Cards:" |
print "Cards:" |
||
printcards cards[] |
|||
print "Sets:" |
print "Sets:" |
||
for i = 1 step 3 to 3 * nsets - 2 |
for i = 1 step 3 to 3 * nsets - 2 |
||
printcards [ set[i] set[i + 1] set[i + 2] ] |
|||
. |
. |
||
. |
. |