Anonymous user
Set puzzle: Difference between revisions
m
clean up header material
(promote to task) |
m (clean up header material) |
||
Line 1:
{{task}}
Set Puzzles are created with a deck of cards from the [
; there are three colors: '''red''', '''green''', or '''purple'''
; there are three symbols: '''oval''', '''squiggle''', or '''diamond'''
; there is a number of symbols on the card: '''one''', '''two''', or '''three'''
; there are three shadings: '''solid''', '''open''', or '''striped'''
Three cards form a
There are two degrees of difficulty: [http://www.setgame.com/set/rules_basic.htm ''basic''] and [http://www.setgame.com/set/rules_advanced.htm ''advanced'']. The basic mode deals 9 cards, that contain exactly 4 sets; the advanced mode deals 12 cards that contain exactly 6 sets. When creating sets you may use the same card more than once. The task is to write code that deals the cards (9 or 12, depending on selected mode) from a shuffled deck in which the total number of sets that could be found is 4 (or 6, respectively); and print the contents of the cards and the sets. For instance:
'''DEALT 9 CARDS:'''▼
:green, one, oval, striped▼
▲DEALT 9 CARDS:
:green, one,
:green, one, diamond,
:green, one, diamond,
:purple,
:purple,
:red, three,
'''CONTAINING 4 SETS:'''▼
red, three, diamond, solid▼
:purple, two, squiggle, open▼
▲:red, three, diamond, solid
▲CONTAINING 4 SETS:
▲green, one, oval, striped
▲green, one, diamond, open
:green, one, diamond,
▲green, one, diamond, open
:purple,
▲purple, two, squiggle, open
▲purple, three, oval, open
=={{header|D}}==
|