It's friday! Which means it's time for beer!
Sadly though, today we will be golfing beer instead of drinking it. :(
Output a beer and drink it. The amount of sips you take changes your output.
Your program should take one input string. This string can solely consist out of concatenated
If the input is an empty string, you should output a full beer glass, including foam.
The more sips you take, the emptier your beer glass will be.
If you take 0 sips, your beer still has foam. The output of this foam is always the same (see examples).
If you take 1 sip, you should output the beer glass, followed by a new line and the string
If you take 1 or more sips, your beerglass should not contain anymore foam, but should show the top of your glass. Drinking the foam counts as one sip.
If you take 6 or more sips, you should output an empty beer glass, followed by a new line and the string
For each sip you take, your beer glass should become emptier. How full your beerglass is depends on the amount of bubbles
°) in your beer. For each sip you take after the foam, a line of bubbles should be removed. Each line of beer can contain a minimum of
1 and a maximum of
5 bubbles. The position of these bubbles should be 100% random.
empty input string, or no input at all
oo o oo oooooooooooo o| ° ° |\ | ° | \ | °° ° |} | | ° ° | / | ° °|/ \__________/
sip sip sip
____________ | |\ | | \ | ° |} | |° ° ° | / | ° ° |/ \__________/
sip sip sip sip sip sip sip sip sip sip
____________ | |\ | | \ | |} | | | / | |/ \__________/ Burp
This pastebin contains a list of inputs and outputs. Remember that the bubbles in the beerglass should be random!
This is code-golf, shortest code in bytes wins!