I found this YouTube video with a table on it showing some card suits with ampersands. You might not understand what it is about, but I still want to make a challenge about it.
The input is two suits, being one of the following:
heart
diamond
spade
club
You can do anything for any other input.
Then the output is their 'game sum':
- If both suits are red (heart/diamond), then:
- Up to one heart promotes to a spade
- Up to one diamond demotes to a club
- Output in order of priority (spade > heart > diamond > club).
Leading and trailing whitespace is allowed.
Example input:
spade
heart
Example output:
spade and heart
Use any language. This is code-golf, so shortest code in bytes wins.
club and spade
an acceptable alternative forspade and club
, or does the order matter? \$\endgroup\$