12345678910111213141516171819202122232425262728293031 |
- using System;
- using System.Linq;
- namespace MISTBowl_Brackets
- {
- public class Team
- {
- public string teamId = string.Empty;
- public int points;
- public string region = string.Empty;
- public Team(string[] input)
- {
- try
- {
- if (input.Length < 2 || input.Length > 3)
- throw new ArgumentException();
- teamId = input[0].Contains('/') ? string.Join("/", input[0].Split('/').OrderBy(a => int.Parse(a))) : input[0];
- region = input[1].ToUpper();
- if (input.Length == 3)
- points = int.Parse(input[2]);
- }
- catch (Exception e)
- {
- Traceback.Write("At Team..ctor(string[]):");
- throw e;
- }
- }
- }
- }
|