Main
Main
import time
age = 10
name = input("Please, write your character's name: ")
class LifeCH:
def __init__(self, age, height, intelligence, happiness, strength, sadness,
money):
self.age = age
self.height = height
self.intelligence = intelligence
self.happiness = happiness
self.strength = strength
self.sadness = sadness
self.money = money
def printer(self):
print(f"Life status right now: \nAge: {self.age}, \nHeight: {self.height},
"
f"\nIntelligence: {self.intelligence}, \nHappiness: {self.happiness},
\nStrength: {self.strength}, \nSadness: {self.sadness}, \nMoney balance:
{self.money}.")
class Father:
eyesColor = randint(1, 3)
if eyesColor == 1:
eyes = "Blue"
elif eyesColor == 2:
eyes = "Brown"
else:
eyes = "Green"
def printStart(self):
oops = 0
print(f"Hello, {name}")
print("-------------------------")
time.sleep(1)
print("System - rebooting.")
time.sleep(1)
print("-")
time.sleep(1)
print("-")
time.sleep(1)
print("-")
time.sleep(1)
print("-")
time.sleep(1)
print("-")
time.sleep(2)
print("System reboot status - unknown.")
time.sleep(1)
print("System repair - granted")
time.sleep(1)
print("System repair - start.")
for i in range(20):
time.sleep(0.3)
print(f"System repair status: {oops}")
oops = oops + 5
print("System reboot - ^&@#^^!#^*#*$#?")
time.sleep(1)
print(f"Welcome, {name}.")
time.sleep(1)
print(
"Tutorial for the game: \nEvery year (of game time) you will choose an
action to do that will change you life characteristics.\nSometimes, there can be
even more options that just an original ones.\nLike: stay out, rob something, or
something esle.\nGood luck.")
time.sleep(5)
print(f"You were born with {self.eyes} eyes.")
time.sleep(2)
class Start(Father):
pass
startEyes = Start()
startEyes.printStart()
class Painter:
def __init__(self, earningsP, tipsP):
self.earningsP = earningsP
self.tipsP = tipsP
def printerP(self):
total = self.earningsP + self.tipsP
print(f"Painter's monthly earnings: {self.earningsP}$, tips: {self.tipsP}$.
Total: {total}$.")
return total
def printerO(self):
total = self.earningsF + self.tipsF
print(f"Office worker's monthly earnings: {self.earningsF}$, tips:
{self.tipsF}$. Total: {total}$.")
return total
class Medic:
def __init__(self, earningsM, tipsM):
self.earningsM = earningsM
self.tipsM = tipsM
def printerM(self):
total = self.earningsM + self.tipsM
print(f"Medic's monthly earnings: {self.earningsM}$, tips: {self.tipsM}$.
Total: {total}$.")
return total
def printerPL(self):
total = self.earningsP + self.tipsP
print(f"Pilot's monthly earnings: {self.earningsP}$, tips: {self.tipsP}$.
Total: {total}$.")
return total
ld = 0
ff = 0
def check16():
license = 0
if characteristics.money <= 0 or characteristics.intelligence < 40:
print("Stupid")
elif characteristics.money > randint(30, 50) and characteristics.intelligence >
40:
characteristics.money -= randint(30, 50)
characteristics.happiness += 5
license += 1
print("-------------------------")
print("You bought a driver license!")
print("-------------------------")
def job16():
if characteristics.intelligence > 30:
print(f"1. You found job at McDonalds! Yearly payment: {job16mm}")
if characteristics.intelligence > 40:
print(f"2. You found job at restaurant. Yearly payment: {job16rr}")
if characteristics.intelligence > 45:
print(f"3. Because of your intelligence, you found job at programming.
Yearly payment: {job16p}")
else:
print("Stupid (Means you are getting homeless, and you don't have anything
to do.)\nGame over. Please, restart the game.")
jobList = int(input("Choose on which job you want to work on (From the list):\
n"))
if jobList == 1:
print("You are working at McDonalds until you turn 21!")
return "McDonald's"
if jobList == 2:
print("You are working at Restaurant until you turn 21!")
return "Restaurant"
if jobList == 3:
print("You are programming until you turn 21!")
return "Programming"
else:
print("Invalid choice.")
return None
license = 0
for i in range(2):
options16 = int(input("1. Get driver license (Costs around 40 dollars,
Intelligence 40)\n2. Find a job for a few years\n3. Try something illegal.\n"))
if options16 == 1:
if ld == 1:
print("You can't choose this option again.")
else:
check16()
ld = 1
characteristics.printer()
if options16 == 2:
if ff == 1:
print("You can't choose this option again.")
else:
job = job16()
ff = 1
characteristics.printer()
if options16 == 3:
print("Bad decision.")
characteristics.sadness += 20
characteristics.strength -= 10
characteristics.money -= characteristics.money
characteristics.intelligence -= 10
characteristics.printer()