public int SpecialTest() { int retValue = 0; foreach (KeyValuePair <int, RainbowRoundInfo> kvp in RoundInfoMap) { RainbowRoundInfo au = kvp.Value; if (IsShowTimeRound(au.RoundNO)) { foreach (int ball in au.BallList) { if (0 != ball) { CommonFunc.SetTestError(ref retValue, ETestError.ShowTimeNotZero); } } } else { foreach (int ball in au.BallList) { if (ball < 0 || ball > 7) { CommonFunc.SetTestError(ref retValue, ETestError.InvalidValue); } } } } return(retValue); }
public int MaxScore() { int ret = 0; int combo = 0; foreach (KeyValuePair <int, RainbowRoundInfo> kvp in RoundInfoMap) { RainbowRoundInfo rinfo = kvp.Value; // int ballcount = 0; foreach (int ball in rinfo.BallList) { if (0 != ball) { combo++; // 多一次 Perfect. int comboLevel = combo > 100 ? 10 : (combo / 10); int markIndex = (int)BeatResultRank.Perfect - 1; int rankMark = mBaseMark[markIndex]; int thisscore = rankMark + rankMark * comboLevel * mComboBonus / 100; ret += thisscore; } } } return(ret); }
void AnalysisRoundNote(Dictionary <int, string> roundNote) { foreach (KeyValuePair <int, string> kvp in roundNote) { RainbowRoundInfo roundInfo = new RainbowRoundInfo(); roundInfo.RoundNO = kvp.Key; string stringNote = kvp.Value; for (int index = 0; index < stringNote.Length; ++index) { string note = stringNote.Substring(index, 1); int ballIndex = 0; int.TryParse(note, out ballIndex); roundInfo.BallList.Add(ballIndex); } RoundInfoMap.Add(kvp.Key, roundInfo); } }