-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrehearsals.py
30 lines (24 loc) · 988 Bytes
/
rehearsals.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
import dates
class RehearsalDate:
# date: string in the form "yyyy-mm-dd"
# actorList: a list of strings that are actor names
# sceneList: a list of strings that are scenes
def __init__(self, date, actorList, sceneList):
self.date = date
self.day = dates.dayOfWeek(date)
self.actorList = actorList
self.sceneList = sceneList
def __str__(self):
return "Date: " + self.date + "\nDay: " + dates.weekdays[self.day] + "\nActors Available: " + str(self.actorList) + "\nScenes: " + str(self.sceneList)
def addActor(self, actor):
self.actorList.append(actor)
def addScene(self, scene):
self.sceneList.append(scene)
def removeActor(self, actor):
for act in self.actorList:
if act == actor:
self.actorList.delete(act)
def removeScene(self, scene):
for scenes in self.sceneList:
if scenes == scene:
self.sceneList.delete(scenes)