Ejemplo n.º 1
0
 static TeamScore ParseMatchText(string text)
 {
     text = text.Trim();
     TeamScore teamScore = new TeamScore();
     int lastSpace = text.LastIndexOf(' ');
     teamScore.TeamName = text.Substring(0, lastSpace);
     string scoreBit = text.Substring(lastSpace + 1);
     string[] scoreBits = scoreBit.Split('-');
     teamScore.Goals = int.Parse(scoreBits[0]);
     teamScore.Points = int.Parse(scoreBits[1]);
     return teamScore;
 }
Ejemplo n.º 2
0
 public Match()
 {
     home = new TeamScore();
     away = new TeamScore();
 }