Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. from abc import abstractmethod
  2.  
  3. class Violation:
  4.     @abstractmethod
  5.     def accept(self):
  6.         pass
  7.  
  8.    
  9. class UsedTimeslot(Violation):
  10.     def __init__(self, timeslot):
  11.         self.timeslot = timeslot
  12.    
  13.     def accept(self, scheduler):
  14.         scheduler.set_timeslot_as_used(self.timeslot)
  15.        
  16. class TeamConstraint(Violation):
  17.     def __init__(self, team, timeslot):
  18.         self.team = team
  19.         self.timeslot = timeslot
  20.        
  21.     def accept(self, team_manager):
  22.         team_manger.dismiss_timeslot(self.team, self.timeslot)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement