April 5th is National Deep DIsh Pizza Day, the theme of this challenge. Given a positive integer n
(n
is greater than 0), create an ASCII deep dish pizza. Actual deep dish pizza shown:
As you can see, there is a layer of crust on the bottom and surrounding the rest of the pizza.
How to make the pizza
The crust is made of two layers. The first layer will be n
tall and n*3
long. Length is the number of characters (including spaces) in the highest line. So given n
is 1, the first layer would look like this:
\_/ 1 character tall
3 characters long
If n
is two:
\ / 2 characters tall
\__/
6 characters long
Now for the second layer of the crust. It will go outside the first, inner crust so therefore, it will be n+2
characters tall and (n*3)+6)
characters long. Given n
is one:
\ / 3 characters tall
\ /
\___/
9 characters long (3 underscores, 3 slashes on either side)
If n
is two:
\ / 4 characters high
\ /
\ /
\____/
12 characters long
You would then match up the two highest pairs of \/
with each other for the inner and outer crust. In n
is 1:
\ \ / /
\ \_/ /
\___/
If done correctly, it would look like a V without the tops with a one character difference between each layer. Speaking of tops, the crust will be joined together by a pair of /\
, separated by a line of underscores (n*3)+2
long to complete the crust and pizza.
Examples
If n
is 1:
/\_____/\
\ \ / /
\ \_/ /
\___/
n
is 2:
/\________/\
\ \ / /
\ \ / /
\ \__/ /
\____/
n
is 3:
/\___________/\
\ \ / /
\ \ / /
\ \ / /
\ \___/ /
\_____/
Winning Criterion
This is code-golf, so the shortest code in bytes wins!
-
instead of a_
? \$\endgroup\$