The Challenge
I am thirsty and need a drink, but I don't know what to order. Your task is to provide me with either a drink or options for one.
I/O
Input will be either a base or a drink name.
If given a base, your program should output one random drink from a list of drinks with that base. If given a drink name, your program should output the base that drink is made from.
Below is a list of drink names, ordered by their bases:
Absinthe:
Death in the Afternoon
Earthquake
Green Russians
Green Vesper
Moloko Plus
Beer:
Black and Tan
Black Velvet
Boilermaker
Michelada
Irish Car Bomb
Brandy:
B&B
Brandy Alexander
French Connection
Horse's Neck
Sidecar
Cachaça:
Caipirinha
Leite de Onça
Quentão
Rabo-de-Galo
Royce
Gin:
Bramble
Casino
Clover Club Cocktail
Gin Fizz
Martini
Rum:
Bacardi
Cuba Libre
Daiquiri
El Presidente
Piña Colada
Tequila:
El Toro Loco
Margarita
Matador
Paloma
Tequila Sunrise
Vodka:
Black Russian
Bloody Mary
Cosmopolitan
Kamikaze
Screwdriver
Whiskey:
Bourbon Lancer
Irish Coffee
Manhattan
Rusty Nail
Whiskey Sour
Rules:
- Standard Loopholes are forbidden.
- If given a base, the program's output should be non-deterministic, meaning that multiple runs should result in different outputs.
- Accordingly, when given a drink name, the program's output should be deterministic, yielding the same result for drinks with the same base.
- You may assume the input will always be one of the bases or drink names in the list compiled above.
- You may choose to print characters such as
ç
,ñ
andã
asc
,n
anda
, respectively. - You may accept I/O in any reasonable format.
- This is a code-golf challenge, so the shortest answer (in bytes) wins.
Test Cases:
Input: Output (Any one of the following):
Absinthe Death in the Afternoon
Earthquake
Green Russians
Green Vesper
Moloko Plus
Beer Black and Tan
Black Velvet
Boilermaker
Michelada
Irish Car Bomb
Brandy B&B
Brandy Alexander
French Connection
Horse's Neck
Sidecar
Cachaça Caipirinha
Leite de Onça
Quentão
Rabo-de-Galo
Royce
Gin Bramble
Casino
Clover Club Cocktail
Gin Fizz
Martini
Rum Bacardi
Cuba Libre
Daiquiri
El Presidente
Piña Colada
Tequila El Toro Loco
Margarita
Matador
Paloma
Tequila Sunrise
Vodka Black Russian
Bloody Mary
Cosmopolitan
Kamikaze
Screwdriver
Whiskey Bourbon Lancer
Irish Coffee
Manhattan
Rusty Nail
Whiskey Sour
Likewise, the input can be any of the drink names in the output column. If so, the output should be the corresponding base.