Example #1
0
 public List<Section> assembleSections(String chartFile)
 {
     List<Section> secs = new List<Section>();
     using (StreamReader sr = File.OpenText(chartFile))
     {
         string line = "";
         while ((line = sr.ReadLine()) != null)
         {
             Section sec = new Section();
             int BPM = Int32.Parse(line.Split('-').ElementAt(0));
             int[] notes = Array.ConvertAll(
                 line.Split('-').ElementAt(1).Split(','),
                 s => int.Parse(s));
             sec.BPM = BPM;
             sec.setNotes(notes);
             secs.Add(sec);
         }
     }
     return secs;
 }