public static bool IsValid(AuditionBallType nBallType) { if (nBallType > AuditionBallType.None && nBallType < AuditionBallType.End) { return(true); } return(false); }
void AnalysisRoundNote(Dictionary <int, string> roundNote, EStageLevel stageLevel) { foreach (KeyValuePair <int, string> kvp in roundNote) { AuditionRoundInfo roundInfo = new AuditionRoundInfo(); roundInfo.RoundNO = kvp.Key; string stringNote = kvp.Value; bool IsReverse = false; for (int index = 0; index < stringNote.Length; ++index) { string note = stringNote.Substring(index, 1); AuditionBallInfo ballInfo = new AuditionBallInfo(); if (note[0] == '*') { IsReverse = true; if (stageLevel > EStageLevel.Hard) { if (note.Contains("5")) { roundNote.Remove(kvp.Key); } } } else { int ballIndex = 0; int.TryParse(note, out ballIndex); AuditionBallType ballType = CAuditionBallType.GetBallType(ballIndex); if (IsReverse) { ballInfo.m_bIsReverse = true; IsReverse = false; } ballInfo.m_BallType = ballType; roundInfo.BallList.Add(ballInfo); if (CAuditionBallType.IsValid(ballType)) { if (roundInfo.m_bAllEmpty) { roundInfo.m_bAllEmpty = false; } } } } RoundInfoMap.Add(kvp.Key, roundInfo); } }