-
Notifications
You must be signed in to change notification settings - Fork 0
/
stageManager.py
34 lines (25 loc) · 889 Bytes
/
stageManager.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
import random
from script import Script
from line import Line
from character import Character
class StageManager:
def __init__(self, actors, topics, pool):
self.characters = self.generateCharacters(actors)
self.topics = topics
self.pool = pool
self.script = Script("TEST SCRIPT")
def produceScript(self, topic):
for i in range(1,2):
for character in self.characters:
line = Line(random.choice(self.pool), character)
self.addLine(character, line)
return self.script
def generateCharacters(self, actors):
characters = []
for ii in range(0, actors):
name = "Actor " + str(ii+1)
characters.append(Character(name))
return characters
def addLine(self, character, line):
character.addLine(line)
self.script.addLine(line)