First challenge!
What is an ambigram?
Ambigrams are word(s) that read the same word(s) or another word given a certain transformation and possibly stylistic alterations.
Example:
That's an example of a rotational ambigram; it reads the same word, even when flipped around.
The Challenge
You are to create a function, program, etc. that can detect whether a given input (consisting of only a-zA-Z chars) is a natural symmetric ambigram (an ambigram that reads the same word without significant artistic alteration given a transformation). You can compete in one or more of the following categories:
Rotational
Examples: I, O, ae, AV, pod
Transformation table (both ways)
a e/D b q d p/P h y l l m w n u/U o o/O/G/Q s s/S t t x x/X z z/Z A v/V B E D G H H I I M W N N Output truesy or falsy value.
Reflectional (Vertical Line)
Examples: wow, mom, HOH
Chars to match
b/d i j l m n o p/q s/z t u v w x y A B/E G/D H I M O Q S/Z T U V W X Y Output truthy or falsy value.
Reflectional (Horizontal Line)
Examples: XOD, KEK, BED
Chars to match
a l o t x B C D E H I K O X Output truthy or falsy value.
Totem
Examples:
x n O o u H x M I O Chars to match
A H I M O T U V W X Y i l m n o t u v w x y Output truthy or falsy value.
Any (bonus of -50%)
This code should either output the type(s) of ambigram(s) that the input could possibly be (if the input is an ambigram) or a falsy value (if the input is not an ambigram).
Code rules
- Standard loopholes are disallowed.
- Input is case-sensitive. This means that AV would count, but aV would not count as a rotational ambigram.
- An input of zero length is considered to be a natural symmetric ambigram.
- Make sure to write your header as:
# Division, Language, Byte-Count. - This is code-golf! You know what that means.
