Hi. I have the terrible problem that I never finish my projects because i get bored or distracted with other stuff.
So, I wanted to make something really easy: text-game.
Its about greek warriors in the olympics, so I need to assign a large number of attributes to each warrior. I want to do that through a function and I first thought about a dictionary.
This is what I have:
def CreateWarrior(name):
attributes = {
#ID
"name": name,
"age": 18,
#Developed
"strength": 0,
##Wrestling
"reflexes": 0,
"speed": 0,
"intelligence": 0,
"discipline": 0,
"physcondition": 0,
#Body
"fat": 0,
"muscle": 0,
"hunger": 0,
"sleepiness": 0,
"health": 0,
"damage": 0,
#Psychological
"mood": 0, # 0 = ultrahappy, 1 = happy, 2 = normal, 3 = mad, 4 = ultramad
"moral": 0
}
Now, I want to make this function to create a variable of the warrior's name, and assign that object all the attributes listed.
How can i do it?