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
59
60
61
62
63
64
65
66
67
68
69
from random import choice

death_msg = [
   "you wake up surrounded by magma with a lava cloud about to rain on your head! You were very unlucky ...",
   "you wake up in the end of the world with zombies everywhere! Too Bad!!!",
   "YOU FELL IN AN ENDLESS PIT!",
   "You woke up buried alive!",
   "You wake up in heaven!",
   "You wake up in heck... have fun with your daemon roomates.",
   "Bombs explode you ...",
   "You become a life sentence cell mate with Donald Trump  >:)"
]

luck_msg = [
    "a portal opens and you earn $1 million dollars worth of gold.",
    "you wake up in your bed in your own room! You sure got lucky!",
    "a door opens and you can see everyone in your life including dead people but they are not zombies!",
    "You opened the lucky block and find an easy escape route.",
    "You teleport out of the room and the world is a great place, there is no polution on earth.",
]

def lucky_unlucky(true_or_false):
    if true_or_false == True:
        return "Lucky"
    return "Unlucky"

block1 = choice([True, False])

if block1 == True:
    block2 = False
else:
    block2 = True

sign1 = choice([True, False])

if sign1 == True:
    sign2 = False
else:
    sign2 = True

msg = """
You wake up in the middle of a room. There are no windows or doors.

You can see two glowing blocks and signs above them.

There is nothing else in the room.

The sign above the left block says {}, the sign above the right block says {}.

[{}]            [{}]
[?]                [?]

"""

s1 = lucky_unlucky(sign1)
s2 = lucky_unlucky(sign2)

print(msg.format(s1, s2, s1, s2))

player_choice = raw_input("Which do you choose?! (l, r): ")

if player_choice not in ['l', 'r']:
    print("You must chose l or r")

elif (player_choice == "l" and block1 == True) or ( player_choice == "r" and block2 == True):
    print(choice(luck_msg))

else:
    print(choice(death_msg))