You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: exercises/17-Russian-Roulette/README.md
+5-6Lines changed: 5 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,21 +2,20 @@
2
2
3
3
Have you ever played Russian Roulette? It's super fun! If you make it (muahahahaha).
4
4
5
-
The revolver gun has only 6 slots for bullets... insert one bullet in one of the slots,
6
-
spin the revolver chamber to make the game random, nobody knows the bullet position.
5
+
The revolver gun has only 6 slots for bullets... insert one bullet in one of the slots, spin the revolver chamber to make the game random, nobody knows the bullet position.
7
6
8
-
FIRE!!!....... are you dead?
7
+
FIRE!!!...... are you dead?
9
8
10
9
## 📝 Instructions:
11
10
12
11
1. The game is almost working, please fill the function `fire_gun` to make the game work.
13
12
14
13
2. Compare the bullet position against the chamber position.
15
14
16
-
3. If the bullet position is equal to the chamber position then the function should return `You are dead!`, else it should return `Keep playing!`
15
+
3. If the bullet position is equal to the chamber position, then the function should return `You are dead!`, else it should return `Keep playing!`
17
16
18
-
## 💡 Hint:
17
+
## 💡 Hints:
19
18
20
19
+ You can get the chamber position by calling the `spin_chamber` function
21
20
22
-
+ If the bullet is at the same slot as the revolver chamber, then it will be fired (`You are dead!`).
21
+
+ If the bullet is at the same slot as the revolver chamber, then it will be fired (`You are dead!`).
0 commit comments