This question already has an answer here:
- Do you want to code a snowman? 27 answers
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 is the stem,
E are the eyes,
M is the mouth, and the parens form the body.
0 for a curl
1 for a straight
2 for a slant left
3 for a slant right
0 for angled
1 for small dots
2 for medium dots
3 for large dots
0 for angled
1 for small dot
2 for medium dot
3 for large dot
0 for a skinny pumpkin (only one pair of parens)
1 for a fat pumpkin (two pairs of parens)
0011 & ((^.^)) 3100 / (.v.) 2331 \ ((OOO)) 1200 | (ovo)
- 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.