Given a single integer x
where 0 <= x <= 91
output a stack of bottles of beer with that many bottles (and shelves) missing. For simplicity sake I'll only show the first 6 bottles and what it would be for each of the first inputs.
Here's the stack of bottles, each number is the bottle you should remove for that input (1-indexed):
Note, we're using 91 instead of 99 because 99 would result in an unstable stack of bottles.
Example
With 0 bottles missing (x=0
):
|=|
| |
| |
/ \
. .
|-----|
| |
|-----|
|_____|
=============
|=| |=|
| | | |
| | | |
/ \ / \
. . . .
|-----| |-----|
| | | |
|-----| |-----|
|_____| |_____|
=====================
|=| |=| |=|
| | | | | |
| | | | | |
/ \ / \ / \
. . . . . .
|-----| |-----| |-----|
| | | | | |
|-----| |-----| |-----|
|_____| |_____| |_____|
=============================
[THERE ARE MORE UNDER THIS]
For the full output of 0, see here: https://pastebin.com/ZuXkuH6s
With 1
bottle missing (x=1
):
|=| |=|
| | | |
| | | |
/ \ / \
. . . .
|-----| |-----|
| | | |
|-----| |-----|
|_____| |_____|
=====================
|=| |=| |=|
| | | | | |
| | | | | |
/ \ / \ / \
. . . . . .
|-----| |-----| |-----|
| | | | | |
|-----| |-----| |-----|
|_____| |_____| |_____|
=============================
[THERE ARE MORE UNDER THIS]
Once again, this is the first two rows from here: https://pastebin.com/ZuXkuH6s (with 1 removed)...
With 2 bottles missing:
|=|
| |
| |
/ \
. .
|-----|
| |
|-----|
|_____|
=====================
|=| |=| |=|
| | | | | |
| | | | | |
/ \ / \ / \
. . . . . .
|-----| |-----| |-----|
| | | | | |
|-----| |-----| |-----|
|_____| |_____| |_____|
=============================
[THERE ARE MORE UNDER THIS]
[ADDITIONAL INPUTS REMOVED]
With 91 bottles missing (n = 91
):
:(
You must output an unhappy face, because you're out of beer.
Rules
- Bottles are to be removed left to right.
- Shelves are removed when no beer remains on the top of the shelves.
- For an input of 0, you are outputting 91 bottles stacked in a triangle.
- The bottom row has 13 bottles, the top has 1.
- 1 space between each bottle on each shelf.
- Shelves must be input between each row of bottles.
- Shelves may use
=
,-
or#
as the character. - Shelves must be 3 wider (on each side) than the bottles they hold.
- Shelves may use
- This is code-golf, lowest byte-count wins.