1
1
import random
2
2
3
3
4
- # tarot deck of 78 cards and 'predictions'
5
- tarot_deck = [
6
- "The Fool: \n \t Experience is your best teacher" ,
7
- "The Magician: \n \t Life is Magic... do you control yours?" ,
8
- "The High Priestess: \n \t Stay away from worldly affairs" ,
9
- "The Empress: \n \t The world bows before you, you bow to none" ,
10
- "The Emperor: \n \t The world bows before you, you bow to none" ,
11
- "The Hierophant: \n \t Follow the 4rc@n3 principles" ,
12
- "The Lovers: \n \t I've never writ, nor no man never loved" ,
13
- "The Chariot: \n \t You'll get to see your dream ride soon" ,
14
- "Strength: \n \t You are stong enough" ,
15
- "The Hermit: \n \t The World hurtles forward, yet you remain uncaught in its riptide" ,
16
- "Wheel of Fortune: \n \t Your luck today depends on whether the first living thing you see is a plant or an animal" ,
17
- "Justice: \n \t The Mills of God grind slow but fine" ,
18
- "The Hanged Man: \n \t That's rough buddy" ,
19
- "Death: \n \t Life's younger sibling brushed your shoulder just now, but you're fine- it was just lint" ,
20
- "Temperance: \n \t The World needs more of it, and of you" ,
21
- "The Devil: \n \t Get over here so I can prove that you exist" ,
22
- "The Tower: \n \t Exchange places with the king" ,
23
- "The Star: \n \t Like diamonds in the sky~" ,
24
- "The Moon: \n \t You might find that your enthusiasm waxes and wanes, but that's alright" ,
25
- "The Sun: \n \t You're the light of someone's life" ,
26
- "Judgement: \n \t *judges you in spanish*" ,
27
- "The World: \n \t These hands could hold you but it'll never be enough~" ,
28
- "Ace of Wands: \n \t You're a wizard, Harry" ,
29
- "Two of Wands: \n \t Your sibling is pretty cool" ,
30
- "Three of Wands: \n \t Try to avoid tournaments for the time being" ,
31
- "Four of Wands: \n \t Find trouble and make it double" ,
32
- "Five of Wands: \n \t Expecto Patronum" ,
33
- "Six of Wands: \n \t Draw your wand" ,
34
- "Seven of Wands: \n \t If you see a noseless man with the complexion of crushed eggshells, RUN" ,
35
- "Eight of Wands: \n \t I'm surprised you got this tbh... I'll let you in on a secret - Seven didn't actually eat Nine" ,
36
- "Nine of Wands: \n \t Oh, the card you're looking for is 3 quarters to the right" ,
37
- "Ten of Wands: \n \t Oh, the card you're looking for is a quarter to the left" ,
38
- "Page of Wands: \n \t You're going to be called to the Head's Office - you shouldn't have messed with alchemy unsupervised" ,
39
- "Knight of Wands: \n \t You just had to buy that giant chess set, didn't you?" ,
40
- "Queen of Wands: \n \t With great power..." ,
41
- "King of Wands: \n \t With great power..." ,
42
- "Ace of Cups: \n \t If you ever see a trophy in the middle of a hedge maze..." ,
43
- "Two of Cups: \n \t Bottoms up, friend!" ,
44
- "Three of Cups: \n \t Two's company, three's better company!" ,
45
- "Four of Cups: \n \t The more the merrier!" ,
46
- "Five of Cups: \n \t Yeah, social distancing is important" ,
47
- "Six of Cups: \n \t Now that's one too many" ,
48
- "Seven of Cups: \n \t Two's company enough" ,
49
- "Eight of Cups: \n \t Take a break" ,
50
- "Nine of Cups: \n \t If three's a crowd..." ,
51
- "Ten of Cups: \n \t Stop it now" ,
52
- "Page of Cups: \n \t I don't think you should drive until you clear your head" ,
53
- "Knight of Cups: \n \t Put that sword down right this instant" ,
54
- "Queen of Cups: \n \t Don't offend anyone influential" ,
55
- "King of Cups: \n \t Don't get on your gaurdians' bad side" ,
56
- "Ace of Swords: \n \t Draw your sword" ,
57
- "Two of Swords: \n \t En garde" ,
58
- "Three of Swords: \n \t Allez!" ,
59
- "Four of Swords: \n \t Parry!" ,
60
- "Five of Swords: \n \t Learn enough to be dangerous" ,
61
- "Six of Swords: \n \t Get yourself a teacher" ,
62
- "Seven of Swords: \n \t Parlay!" ,
63
- "Eight of Swords: \n \t Do something nice for a stranger" ,
64
- "Nine of Swords: \n \t Be chivalrous" ,
65
- "Ten of Swords: \n \t I'm not asking for much, just be nice" ,
66
- "Page of Swords: \n \t The pen is mightier" ,
67
- "Knight of Swords: \n \t Live by the code you're honour-bound to follow" ,
68
- "Queen of Swords: \n \t Pledge alliance" ,
69
- "King of Swords: \n \t Pledge alliance" ,
70
- "Ace of Coins: \n \t You now have an iron nail" ,
71
- "Two of Coins: \n \t Flip a coin" ,
72
- "Three of Coins: \n \t For want of a nail..." ,
73
- "Four of Coins: \n \t You now have a paperclip" ,
74
- "Five of Coins: \n \t Sleep well, it is a blessing" ,
75
- "Six of Coins: \n \t Roll a die" ,
76
- "Seven of Coins: \n \t You're a lucky one" ,
77
- "Eight of Coins: \n \t You're like a pineapple tree - i.e. you're a factual error" ,
78
- "Nine of Coins: \n \t Accessory fruit(affectionate)" ,
79
- "Ten of Coins: \n \t <insert cool fruit fact here>" ,
80
- "Page of Coins: \n \t You're due for a promotion soon" ,
81
- "Knight of Coins: \n \t Treat your subordinates" ,
82
- "Queen of Coins: \n \t You're worth your weight in gold" ,
83
- "King of Coins: \n \t You're worth your weight in gold"
84
- ]
85
-
4
+ # get tarot deck of 78 cards and 'predictions' from tarot.txt
5
+ file_handle = open ("tarot.txt" , "r" )
6
+ cards = file_handle .readlines ()
7
+ tarot_deck = []
8
+ for card in cards :
9
+ tarot_deck .append (card )
86
10
87
11
def fin ():
88
12
print ("Whichever your choice was..." )
@@ -111,12 +35,12 @@ def youve_chosen_yes():
111
35
print ()
112
36
print ("Your second card is..." )
113
37
pick_card2 = random .randint (0 , 78 )
114
- print (tarot_deck [pick_card2 ] if pick_card2 != pick_card1 else tarot_deck [random .randint (0 , 78 )])
38
+ print (tarot_deck [pick_card2 ] if pick_card2 != pick_card1 else tarot_deck [random .randint (0 , 78 )])
115
39
input (">> press enter" )
116
40
print ()
117
41
print ("And your third and final card is..." )
118
42
pick_card3 = random .randint (0 , 78 )
119
- print (tarot_deck [pick_card3 ] if pick_card3 != pick_card1 and pick_card3 != pick_card2 else tarot_deck [random .randint (0 , 78 )])
43
+ print (tarot_deck [pick_card3 ] if pick_card3 != pick_card1 and pick_card3 != pick_card2 else tarot_deck [random .randint (0 , 78 )])
120
44
input (">> press enter" )
121
45
print ()
122
46
fin ()
@@ -147,7 +71,7 @@ def youve_chosen_neither():
147
71
fin ()
148
72
149
73
150
- # Introductory text
74
+ # Introductory lines
151
75
print ("In this black box, you read white words" )
152
76
input (">> press enter" )
153
77
print ("Words that might warn you of danger..." )
@@ -158,12 +82,12 @@ def youve_chosen_neither():
158
82
input (">> press enter" )
159
83
print ()
160
84
161
-
162
- # Choice made here
85
+ # Choice to be made here
163
86
print ("Do you dare draw a card?" )
164
87
ch = input (">> enter Y/N: " )
165
88
print ("\n Interesting..." )
166
89
90
+ # Driver code
167
91
if ch .lower () == 'y' :
168
92
youve_chosen_yes ()
169
93
0 commit comments