Draw an "apartment" building according to the specifications below.
Basic Rules
Take, as input, the number of floors of the building. Return a building with that many floors meeting the following specifications:
The building will be eight characters wide, with eight underscore characters (_
) on top and eight dashes (-
) on the bottom.
The first floor of the building will always look like this: | || |
.
As long as the building has more than one floor, the top floor will always look like this: | ---- |
All floors in between must be randomly selected between the following:
| - - |
| [] |
|__ __|
Example Outputs:
5 floors:
________
| ---- |
| [] |
| - - |
|__ __|
| || |
--------
2 floors:
________
| ---- |
| || |
--------
1 floor:
________
| || |
--------
Specific rules
Your inputted number of floors will, at minimum, be 1.
You may output as a string, a list of strings, a nested list of characters, or any other output format in which the position of each element is clear.
All floor types must have a nonzero chance of appearing at any given level (other than the bottom and the top), but they do not have to be uniformly randomly chosen.
Code-golf, so shortest code wins.
_
,-
,|
,[
and]
? \$\endgroup\$