-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmin.js
More file actions
31 lines (25 loc) · 722 Bytes
/
min.js
File metadata and controls
31 lines (25 loc) · 722 Bytes
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
27
28
29
30
31
const prompt = require("prompt-sync")();
const pace = +prompt("pace: ");
const agility = +prompt("agility: ");
const strength = +prompt("strength: ");
let shouldExit = false;
if (pace > 99 || pace < 1) {
console.log("Pace out of bounds. Pace must be between 1 and 99.");
shouldExit = true;
}
if (agility > 99 || agility < 1) {
console.log("Agility out of bounds. Agility must be between 1 and 99.");
shouldExit = true;
}
if (strength > 99 || strength < 1) {
console.log("Strength out of bounds. Agility must be between 1 and 99.");
shouldExit = true;
}
if (shouldExit) {
process.exit();
}
if (pace > 80 || agility > 80 || strength > 80) {
console.log("Buy.");
} else {
console.log("Don't buy.");
}