public void Test_Save_Load() { HightScoreCollection NewScore = new HightScoreCollection(); NewScore.Save(HightScoreCollection.HighScores); List <string> result = NewScore.Load(); string results = result[0]; Assert.IsFalse(results == "1 Dorcas 456735"); }
//Generates the highscore screen. public void Generate_HighScoreScreen() { List <string> HighScoreData = HightScoreCollection.Load(); int Rank = 1; foreach (string line in HighScoreData) { string[] values = line.Split(' '); Ranks.Children.Add(new Label { Text = Rank.ToString() }); Names.Children.Add(new Label { Text = values[0] }); Score.Children.Add(new Label { Text = values[1] }); } ++Rank; }