Пример #1
0
 //constructor
 public Day(int _number, Place map_hq)
 {
     number = _number;
     Activity defaultAct = new Inside(0, 147, map_hq);
     for (int i = 0; i <= 147; i++) //24*6+4 -1 because no activity at 24:40
     {
         //create default activity
         l_activity[i] = defaultAct;
     }
 }
Пример #2
0
 public void rmActivity(Activity prevActivity, int start, int end)
 {
     if ((l_activity.Contains(prevActivity)) && (prevActivity.Start <= start) && (prevActivity.End >= end))
     {
         //replace the remove activity by the default one which is private at the hq
         Activity newActivity = new Inside(start, end, map_hq);
         addActivity(newActivity);
     }
     else
     {
         //message erreur
     }
 }