Details
Set is a card game played with a deck of 81 unique cards that vary in four
features, each of which takes on three values:
- Number of shapes: each card contains either 1, 2, or
3 shapes.
- Color: the shapes on each card are either Red, Green, or
Purple.
- Shading: each shape is either Solid, Half-shaded, or
Empty.
- Shape: the shapes on each card are either Ovals, Diamonds,
or Waves.
A card is represented by the values of its features, with each value encoded
by its first character. For example, 2RSW
means 2
Red Solid Waves.
The goal of the game is to find a set of three cards, such that for
each of the four features, either all three cards have different values or
all three cards have the same value. For example, 2RSW
,
2PHW
, and 2GEW
form a set because they all have
the same number and shape, and none of them have the same color or shading.
Arguments consist of twelve cards that are guaranteed to contain exactly one
set. For each argument, print the contained set with the cards in order of
their appearance separated by spaces, one set per line.
External links:
Rosetta Code,
Wikipedia
05AB1E is an experimental language, solutions won't contribute to
scoring until the language goes live. Please leave feedback on the
GitHub issue.
ALGOL 68 is an experimental language, solutions won't contribute to
scoring until the language goes live. Please leave feedback on the
GitHub issue.
APL is an experimental language, solutions won't contribute to
scoring until the language goes live. Please leave feedback on the
GitHub issue.
Arturo is an experimental language, solutions won't contribute to
scoring until the language goes live. Please leave feedback on the
GitHub issue.
Befunge is an experimental language, solutions won't contribute to
scoring until the language goes live. Please leave feedback on the
GitHub issue.
BQN is an experimental language, solutions won't contribute to
scoring until the language goes live. Please leave feedback on the
GitHub issue.
CJam is an experimental language, solutions won't contribute to
scoring until the language goes live. Please leave feedback on the
GitHub issue.
CoffeeScript is an experimental language, solutions won't contribute to
scoring until the language goes live. Please leave feedback on the
GitHub issue.
Egel is an experimental language, solutions won't contribute to
scoring until the language goes live. Please leave feedback on the
GitHub issue.
Erlang is an experimental language, solutions won't contribute to
scoring until the language goes live. Please leave feedback on the
GitHub issue.
Fennel is an experimental language, solutions won't contribute to
scoring until the language goes live. Please leave feedback on the
GitHub issue.
Groovy is an experimental language, solutions won't contribute to
scoring until the language goes live. Please leave feedback on the
GitHub issue.
Harbour is an experimental language, solutions won't contribute to
scoring until the language goes live. Please leave feedback on the
GitHub issue.
Hare is an experimental language, solutions won't contribute to
scoring until the language goes live. Please leave feedback on the
GitHub issue.
Haxe is an experimental language, solutions won't contribute to
scoring until the language goes live. Please leave feedback on the
GitHub issue.
Hush is an experimental language, solutions won't contribute to
scoring until the language goes live. Please leave feedback on the
GitHub issue.
Hy is an experimental language, solutions won't contribute to
scoring until the language goes live. Please leave feedback on the
GitHub issue.
iogii is an experimental language, solutions won't contribute to
scoring until the language goes live. Please leave feedback on the
GitHub issue.
Odin is an experimental language, solutions won't contribute to
scoring until the language goes live. Please leave feedback on the
GitHub issue.
Picat is an experimental language, solutions won't contribute to
scoring until the language goes live. Please leave feedback on the
GitHub issue.
Qore is an experimental language, solutions won't contribute to
scoring until the language goes live. Please leave feedback on the
GitHub issue.
Racket is an experimental language, solutions won't contribute to
scoring until the language goes live. Please leave feedback on the
GitHub issue.
Rebol is an experimental language, solutions won't contribute to
scoring until the language goes live. Please leave feedback on the
GitHub issue.
Rexx is an experimental language, solutions won't contribute to
scoring until the language goes live. Please leave feedback on the
GitHub issue.
Scala is an experimental language, solutions won't contribute to
scoring until the language goes live. Please leave feedback on the
GitHub issue.
Squirrel is an experimental language, solutions won't contribute to
scoring until the language goes live. Please leave feedback on the
GitHub issue.
Stax is an experimental language, solutions won't contribute to
scoring until the language goes live. Please leave feedback on the
GitHub issue.
Uiua is an experimental language, solutions won't contribute to
scoring until the language goes live. Please leave feedback on the
GitHub issue.
Vyxal is an experimental language, solutions won't contribute to
scoring until the language goes live. Please leave feedback on the
GitHub issue.