-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbankHeist.go
58 lines (48 loc) · 1.42 KB
/
bankHeist.go
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package main
import (
"fmt"
"math/rand"
"time"
)
func main() {
rand.Seed(time.Now().UnixNano())
isHeistOn := true
eludedGuards := rand.Intn(100)
if eludedGuards >= 50 {
fmt.Println("Looks like you've managed to make it past the guards. Good job, but remember, this is the first step.")
} else {
isHeistOn = false
fmt.Println("Probably should have upped your sneak skill. [Heist Failed]")
}
openedVault := rand.Intn(100)
if isHeistOn && openedVault >= 70 {
fmt.Println("The vault is open, grab as much as you can and try to make it out!")
} else if isHeistOn && openedVault <= 70 {
isHeistOn = false
fmt.Println("Couldn't open the vault, better up your lock picking skills next time. [Heist Failed]")
}
leftSafely := rand.Intn(6)
if isHeistOn {
switch leftSafely {
case 0:
isHeistOn = false
fmt.Println("RIP, guards snuck up on you while you were loading the cash. [Heist Failed]")
case 1:
isHeistOn = false
fmt.Println("Next time make sure the door doesn't lock you in. [Heist Failed]")
case 2:
isHeistOn = false
fmt.Println("Maybe don't hire an undercover FBI agent next time. [Heist Failed]")
case 3:
isHeistOn = false
fmt.Println("Probably shouldn't have tried to carry so much, too slow. [Heist Failed]")
default:
fmt.Println("Start the getaway car!")
}
if isHeistOn {
amtStolen := 10000 + rand.Intn(1000000)
fmt.Println(amtStolen)
}
}
fmt.Println(isHeistOn)
}