示例#1
0
 public void Drive(ResContainer r)
 {
     Y = r._Ride.EndY;
     X = r._Ride.EndX;
     CarTime += r.TimeOfDrive;
     Rides.Add(r._Ride.ID);
     Program.Atlas.RemoveRide(r._Ride.StartY, r._Ride.StartX, r._Ride);
     Program._Points.Remove(r._point);
     if(CarTime >= Program.T)
         EndRun();
 }
示例#2
0
        public ResContainer(ResContainer rold, int minretdist)
        {
            waitTime = rold.waitTime;
            ApproachDistance = rold.ApproachDistance;
            _Ride = rold._Ride;
            Bonus = rold.Bonus;
            TimeOfDrive = ApproachDistance + _Ride.Distance + waitTime;
            PointsEarned = _Ride.Distance;
            _point = rold._point;

            if (Bonus)
                this.PointsEarned += Program.B;

            TimeProportion = (double)this.TimeOfDrive / (double)(ApproachDistance + waitTime + minretdist);
        }