Python

No description

fork
loading
Files
  • main.py
main.py
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
import replit, sys, random, time

letters = {
    "a": ["###", "# #", "###", "# #", "# #"],
    "b": ["###", "# #", "###", "# #", "###"],
    "c": ["###", "#", "#", "#", "###"],
    "d": ["##", "# #", "# #", "# #", "##"],
    "e": ["###", "#", "###", "#", "###"],
    "f": ["###", "#", "###", "#", "#"],
    "g": ["###", "# #", "###", "  #", "###"],
    "h": ["# #", "# #", "###", "# #", "# #"],
    "i": ["###", " #", " #", " #", "###"],
    "j": ["###", " #", " #", " #", "##"],
    "k": ["# #", "##", "#", "##", "# #"],
    "l": ["#", "#", "#", "#", "###"],
    "m": ["# #", "###", "###", "# #", "# #"],
    "n": ["###", "# #", "# #", "# #", "# #"],
    "o": ["###", "# #", "# #", "# #", "###"],
    "p": ["###", "# #", "###", "#", "#"],
    "q": ["###", "# #", "###", "  #", "  #"],
    "r": ["###", "# #", "##", "# #", "# #"],
    "s": ["###", "#", "###", "  #", "###"],
    "t": ["###", " #", " #", " #", " #"],
    "u": ["# #", "# #", "# #", "# #", "###"],
    "v": ["# #", "# #", "# #", "# #", " #"],
    "w": ["# #", "# #", "# #", "###", "###"],
    "x": ["# #", " #", " #", " #", "# #"],
    "y": ["# #", "# #", "###", "  #", "###"],
    "z": ["###", "  #", " #", "#", "###"],
    " ": [" "],
    "1": [" #", "##", " #", " #", "###"],
    "2": ["###", "  #", "###", "#", "###"],
    "3": ["###", "  #", "###", "  #", "###"],
    "4": ["#", "#", "# #", "###", "  #"],
    "5": ["###", "#", "###", "  #", "###"],
    "6": ["###", "#", "###", "# #", "###"],
    "7": ["###", "  # ", " #", " #", "#"],
    "8": ["###", "# #", "###", "# #", "###"],
    "9": ["###", "# #", "###", "  #", "###"],
    "0": ["###", "# #", "# #", "# #", "###"],
    "!": [" # ", " # ", " # ", "   ", " # "],
    "?": ["###", "  #", " ##", "   ", " # "],
    ".": ["   ", "   ", "   ", "   ", " # "],
    "]": ["   ", "   ", "   ", "  #", " # "],
    "/": ["  #", "  #", " # ", "# ", "# "],
    ":": ["   ", " # ", "   ", " # ", "   "],
    "@": ["###", "# #", "## ", "#  ", "###"],
    "'": [" # ", " # ", "   ", "   ", "   "],
    "#": [" # ", "###", " # ", "###", " # "]
}


def steady_printBlock(text):
	for character in text:
		sys.stdout.write(character)
		time.sleep(.005)
	return ""


def print_letters(text):
	bigletters = []
	for i in text:
		bigletters.append(letters.get(i.lower(), letters[' ']))
	output = [''] * 5
	for i in range(5):
		for j in bigletters:
			temp = ' '
			try:
				temp = j[i]
			except:
				pass
			temp += ' ' * (5 - len(temp))
			temp = temp.replace(' ', ' ')
			temp = temp.replace('#', '@')
			output[i] += temp
	return '\n'.join(output)


def steady_print(text):
	for character in text:
		sys.stdout.write(character)
		time.sleep(.05)
	return ""


def abilitiesSteady_Print(text):
	for character in text:
		sys.stdout.write(character)
		time.sleep(.01)
	return ""


pointsDictionary = {
    "0": 0,
    "1": 1,
    "2": 2,
    "3": 3,
    "4": 4,
    "5": 5,
    "6": 6,
    "7": 7,
    "8": 8,
    "9": 9,
    "10": 10,
    "11": 11,
    "12": 12,
    "13": 13,
    "14": 14,
    "15": 15
}

printer = print_letters("Life")
steady_printBlock(printer)
steady_print("\n\n\n\nWelcome to Life")
time.sleep(1)
steady_print("\nThe game where you can create a life outside of your own.\n")
time.sleep(1)
steady_print("\n\nLet's begin.")
time.sleep(2)
replit.clear()

steady_print("What is your name?")
name = input("\n>")

time.sleep(.05)

steady_print("\n\nAlright, %s let's begin\n" % name)
time.sleep(3)
replit.clear()

steady_print(
    "\nDazed and confused, you rise out of a gaping hole. For the first time, you feel air rush into your lungs, and a bright light blinds you. A man in a long blue dress flips you upside-down and slaps you on the ass as you catch a glimpse of a woman who looks dead on the table behind you."
)

input("\n\nPress enter to continue...")
replit.clear()

steady_print(
    "\n\nYou have fifteen points to spend on these categories: \n\nCharisma, Intelligence, Strength, Agility, and Constitution"
)
input(steady_print("\n\nPress enter to continue..."))
replit.clear()
attributesD = {
    "Charisma": 0,
    "Intelligence": 0,
    "strength": 0,
    "agility": 0,
    "constitution": 0
}
totalPoints = 15

time.sleep(.5)


def listing():
	replit.clear()
	print(" Attributes ".center(108, "*"))
	abilitiesSteady_Print("\n\nPoints left: " + str(totalPoints) + "\n\n")
	for index in attributesD:
		abilitiesSteady_Print(index + ": " + str(attributesD[index]) + "\n\n")
		time.sleep(1)


while True:
	for key in attributesD:
		listing()
		while True:
			answer = input(
			    "\n\nHow many points would you like to put in " + key + "?\n>")
			if answer in pointsDictionary:
				if pointsDictionary[answer] <= totalPoints:
					attributesD[key] = pointsDictionary[answer]
					totalPoints -= attributesD[key]
					break
				elif pointsDictionary[answer] > totalPoints:
					print("Not Possible")
					continue
			elif int(attributesD[key]) != pointsDictionary:
				print("Not Possible")
				continue
	listing()
	input(
	    abilitiesSteady_Print(
	        "If you are pleased with your points, press enter..."))
	break