-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
26 lines (22 loc) · 972 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min)) + min;
}
const alcoholics = ["Barcelo","Larios","Jagger","Absolut","Negrita","Fireball","Malibu","Legendario","Bacardi"]
const mixes = ["Cocacola", "Fanta Naranja", "Redbull", "Nestea", "Fanta Limon", "Aquarius", "7up", "Zumo piña"]
const random = ["Sin hielo", ""]
const cerveza = ["caña", "tercio", "jarra"]
function getOutput(){
let response;
switch (getRandomInt(1,4)) {
case 1:
response = `Te vas a librar, sólo te pides una ${cerveza[getRandomInt(0,3)]}.\n`
break;
case 2:
response = `Mala suerte, javibu te pilla por banda y te invita a un chupito de ${alcoholics[getRandomInt(0,9)]}.\n`
break;
case 3:
response = `Vas a verte obligado a pedirte un cubata de ${alcoholics[getRandomInt(0,9)]} con ${mixes[getRandomInt(0,7)]}`
break;
}
return response;
}