Today is Halloween and it's time to carve some pumpkins!
&
((^.^))
Given an input integer, string, list of integers, etc., output the corresponding pumpkin. The input will always be of the form Stem, Eyes, Mouth, Width
. For example, 2331
would be a valid input.
The pumpkin takes the form:
S
((EME))
where S
is the stem, E
are the eyes, M
is the mouth, and the parens form the body.
Definitions
Stem:
0
for a curl &
1
for a straight |
2
for a slant left \
3
for a slant right /
Eyes:
0
for angled ^
1
for small dots .
2
for medium dots o
3
for large dots O
Mouth:
0
for angled v
1
for small dot .
2
for medium dot o
3
for large dot O
Width:
0
for a skinny pumpkin (only one pair of parens)
1
for a fat pumpkin (two pairs of parens)
Examples
0011
&
((^.^))
3100
/
(.v.)
2331
\
((OOO))
1200
|
(ovo)
Rules
- Input/output can be given by any convenient method.
- You can print it to STDOUT or return it as a function result.
- Either a full program or a function are acceptable.
- Any amount of extraneous whitespace is permitted, provided the characters line up appropriately.
- You must use the numbering and ordering of the pumpkin carvings as they are described above.
- Standard loopholes are forbidden.
- This is code-golf so all usual golfing rules apply, and the shortest code (in bytes) wins.