cli-slot-game 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +28 -1
- package/package.json +7 -7
package/index.js
CHANGED
|
@@ -62,9 +62,36 @@ async function playRound() {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
function showInstructions() {
|
|
66
|
+
const border = chalk.yellowBright("═".repeat(48));
|
|
67
|
+
const side = chalk.yellowBright("║");
|
|
68
|
+
|
|
69
|
+
console.log(border);
|
|
70
|
+
console.log(side + chalk.bold.whiteBright(" 🎰 HOW TO PLAY ") + " ".repeat(27) + side);
|
|
71
|
+
console.log(border);
|
|
72
|
+
console.log(side + " " + side);
|
|
73
|
+
console.log(side + chalk.cyanBright(" Symbols: ") + SYMBOLS.join(" ") + " " + side);
|
|
74
|
+
console.log(side + " " + side);
|
|
75
|
+
console.log(side + chalk.bold.whiteBright(" Rules:") + " " + side);
|
|
76
|
+
console.log(side + chalk.green(" 🎯 3 matching symbols → Win 10x your bet") + " " + side);
|
|
77
|
+
console.log(side + chalk.green(" 🎯 2 matching symbols → Win 2x your bet") + " " + side);
|
|
78
|
+
console.log(side + chalk.red(" ❌ No match → Lose your bet") + " " + side);
|
|
79
|
+
console.log(side + " " + side);
|
|
80
|
+
console.log(side + chalk.bold.whiteBright(" How it works:") + " " + side);
|
|
81
|
+
console.log(side + chalk.gray(" 1. Enter your bet amount") + " " + side);
|
|
82
|
+
console.log(side + chalk.gray(" 2. Watch the reels spin") + " " + side);
|
|
83
|
+
console.log(side + chalk.gray(" 3. Match symbols to win!") + " " + side);
|
|
84
|
+
console.log(side + " " + side);
|
|
85
|
+
console.log(side + chalk.magentaBright(" 💰 Starting balance: $100") + " " + side);
|
|
86
|
+
console.log(side + chalk.magentaBright(" 🏆 Go for the JACKPOT (3 of a kind)!") + " " + side);
|
|
87
|
+
console.log(side + " " + side);
|
|
88
|
+
console.log(border);
|
|
89
|
+
console.log();
|
|
90
|
+
}
|
|
91
|
+
|
|
65
92
|
async function play() {
|
|
66
93
|
banner("Slots", "cyanBright");
|
|
67
|
-
|
|
94
|
+
showInstructions();
|
|
68
95
|
|
|
69
96
|
while (balance > 0) {
|
|
70
97
|
await playRound();
|
package/package.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cli-slot-game",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
8
|
},
|
|
9
9
|
"bin": {
|
|
10
|
-
|
|
10
|
+
"cli-slot-game": "./index.js"
|
|
11
11
|
},
|
|
12
12
|
"keywords": [],
|
|
13
13
|
"author": "",
|
|
14
|
-
"license": "ISC",
|
|
14
|
+
"license": "ISC",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
"chalk": "^5.6.2",
|
|
18
|
+
"figlet": "^1.11.0",
|
|
19
|
+
"inquirer": "^14.0.2"
|
|
20
20
|
}
|
|
21
21
|
}
|