예제 #1
0
        //Gets a list of every hitpoint and its associated difficulty
        public HitPoint[] GetNoteDifficulty()
        {
            double      circlesize = Double.Parse(map.GetTag("Difficulty", "CircleSize"), CultureInfo.InvariantCulture);
            CatcherInfo catcher    = new CatcherInfo(circlesize);

            PatternParser patterndetector = new PatternParser(map, positions, times);

            int[] DCtimes = patterndetector.GetDirectionalChangeTimes();
            int[] SGtimes = patterndetector.GetStopGoTimes();

            List <HitPoint> notes = new List <HitPoint>();

            for (int i = 1; i < positions.Length; i++)
            {
                //Cast to make division operation a double
                //double velocity = Math.Abs(positions[i] - positions[i-1]) / (double)(times[i] - times[i-1]);
                //Scale velocity to be a percent of a pixel-jump - a pixel jump is equal to 1
                double velocity = catcher.PercentHyper(Math.Abs(positions[i] - positions[i - 1]), times[i] - times[i - 1]);
                if (velocity > 1)
                {
                    velocity = 0.2;
                    //velocity = 1.0 / Math.Pow((times[i] - times[i-1]), 0.3);
                }
                else
                {
                    //Scale normal jumps
                    velocity = Math.Pow(velocity, 2);
                }

                double difficulty = velocity;

                difficulty = this.CalculateNonmovementDifficulty(i, catcher, difficulty);

                difficulty = this.CalculateDCDensity(i, catcher, DCtimes, velocity, difficulty);

                //difficulty = this.CalculateHyperChanges(i, DCtimes, catcher, difficulty);

                //difficulty = this.CalculateSGDensity(i, SGtimes, velocity, difficulty);

                notes.Add(new HitPoint(positions[i], times[i], difficulty, i));
            }

            return(notes.ToArray());
        }
예제 #2
0
     //Gets a list of every hitpoint and its associated difficulty
     public HitPoint[] GetNoteDifficulty()
     {
         double circlesize = Double.Parse(map.GetTag("Difficulty", "CircleSize"), CultureInfo.InvariantCulture);
         CatcherInfo catcher = new CatcherInfo(circlesize);
         
         PatternParser patterndetector = new PatternParser(map, positions, times);
         
         int[] DCtimes = patterndetector.GetDirectionalChangeTimes();
         int[] SGtimes = patterndetector.GetStopGoTimes();
         
         List<HitPoint> notes = new List<HitPoint>();
 
         for(int i = 1; i < positions.Length; i++)
         {
             //Cast to make division operation a double
             //double velocity = Math.Abs(positions[i] - positions[i-1]) / (double)(times[i] - times[i-1]);
             //Scale velocity to be a percent of a pixel-jump - a pixel jump is equal to 1
             double velocity = catcher.PercentHyper(Math.Abs(positions[i] - positions[i-1]), times[i] - times[i-1]);
             if(velocity > 1)
             {
                 velocity = 0.2;
                 //velocity = 1.0 / Math.Pow((times[i] - times[i-1]), 0.3);
             }
             else
             {
                 //Scale normal jumps
                 velocity = Math.Pow(velocity, 2);
             }
             
             double difficulty = velocity;
 
             difficulty = this.CalculateNonmovementDifficulty(i, catcher, difficulty);
             
             difficulty = this.CalculateDCDensity(i, catcher, DCtimes, velocity, difficulty);
             
             //difficulty = this.CalculateHyperChanges(i, DCtimes, catcher, difficulty);
             
             //difficulty = this.CalculateSGDensity(i, SGtimes, velocity, difficulty);
             
             notes.Add(new HitPoint(positions[i], times[i], difficulty, i));
         }
         
         return notes.ToArray();
     }