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); } } }
public BingoCard() { Card = new BingoValue[5, 5]; CheckedNumbers = new(); UncheckedNumbers = new(); }