示例#1
0
    public void AddRow(int rowNumber, string values)
    {
        string[] valueSplit = values.Split(' ', StringSplitOptions.RemoveEmptyEntries);

        if (valueSplit.Length != 5)
        {
            throw new Exception("check input");
        }

        for (int i = 0; i < valueSplit.Length; i++)
        {
            if (int.TryParse(valueSplit[i], out int number))
            {
                Card[rowNumber, i] = new BingoValue(number);
                UncheckedNumbers.Add(number);
            }
        }
    }
示例#2
0
 public BingoCard()
 {
     Card             = new BingoValue[5, 5];
     CheckedNumbers   = new();
     UncheckedNumbers = new();
 }