private PerformanceCalculator CreatePerformanceCalculatorData(Performance aPerformance, PlayDetails aPlay)
        {
            switch (aPlay.Type)
            {
            case "tragedy": return(new TragedyCalculator(aPerformance, aPlay));

            case "comedy": return(new ComedyCalculator(aPerformance, aPlay));

            default:
                throw new Exception($"unknown type: { aPlay.Type }");
            }
        }
예제 #2
0
 public ComedyCalculator(Performance aPerformance, PlayDetails aPlay)
     : base(aPerformance, aPlay)
 {
 }
예제 #3
0
 public PerformanceCalculator(Performance aPerformance, PlayDetails aPlay)
 {
     Performance = aPerformance;
     Play        = aPlay;
 }