-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathGameFunctions.py
More file actions
39 lines (29 loc) · 1018 Bytes
/
Copy pathGameFunctions.py
File metadata and controls
39 lines (29 loc) · 1018 Bytes
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
import DinoFunctions
import Dinosaur
import random
def pickSize():
sizeList = ['Small', 'Medium', 'Large']
return random.choice(sizeList)
def pickMouth():
mouthList = ['Beak', 'Herbivore Teeth', 'Carnivore Teeth']
return random.choice(mouthList)
def pickMobility():
mobilityList = ['Bipedal', 'Quadruped', 'Flying']
return random.choice(mobilityList)
def pickCombat():
combatList = [None, 'Spikes', 'Horns', 'Claws']
return random.choice(combatList)
def pickNeck():
neckList = ['Long', None]
return random.choice(neckList)
def pickTail():
tailList = [None, 'Mobile Tail', 'Attack Tail']
return random.choice(tailList)
def createDino():
newDino = Dinosaur.Dinosaur(Size = pickSize(), Mouth = pickMouth(), Mobility = pickMobility(), Combat = pickCombat(), Neck = pickNeck(), Tail = pickTail())
return newDino
def populateDinoList(num, parent=None):
dinoList = []
for i in range(num):
dinoList.append(createDino())
return dinoList