Esempio n. 1
0
 private static int evaluate(int currentTime, Step currentStep, int frameScore, int[] scoreTable)
 {
     //Check the timing
     if (currentStep.timing - BADMARGIN < currentTime && currentTime < currentStep.timing + BADMARGIN)
     {
         if (currentStep.timing - GOODMARGIN < currentTime && currentTime < currentStep.timing + GOODMARGIN)
         {
             if (currentStep.timing - EXCELLENTMARGIN < currentTime && currentTime < currentStep.timing + EXCELLENTMARGIN)
             {
                 frameScore += EXCELLENTMARK;
                 scoreTable[0]++;
                 currentStep.step_Done(Score.Excellent);
                 combo++;
             }
             //GOOD MARK
             else
             {
                 frameScore += GOODMARK;
                 scoreTable[1]++;
                 currentStep.step_Done(Score.Good);
                 combo++;
             }
         }
         //BAD MARK
         else
         {
             frameScore += BADMARK;
             scoreTable[2]++;
             currentStep.step_Done(Score.Bad);
             combo = 1;
         }
     }
     return frameScore;
 }