예제 #1
0
 private void SaveState(
     CasualMaster casualMaster,
     HardCoreMaster hardCoreMaster)
 {
     casualMaster.SaveState();
     hardCoreMaster.SaveState();
 }
예제 #2
0
 public ScheduleGenerator(
     string dateIn,
     TextWriter outputWriter)
 {
     ScheduleStarts = dateIn;
     _outputWriter  = outputWriter;
     CasualMaster   = new CasualMaster();
     HardCoreMaster = new HardCoreMaster();
     MediaLottery   = new MediaLottery();
     GameLottery    = new GameLottery();
 }
예제 #3
0
        private static void Allocate(
            List <RecSession> sessions,
            CasualMaster casualMaster,
            HardCoreMaster hardCoreMaster)
        {
            foreach (var session in sessions)
            {
                if (session.IsBooked())
                {
                    continue;
                }

                if (session.SessionType == SessionType.Casual)
                {
                    session.Activity = casualMaster.SelectActivity();
                }
                else if (session.SessionType == SessionType.Double)
                {
                    session.Activity = hardCoreMaster.SelectActivity();
                }
            }
        }