private static void Main(string[] args) { Console.WriteLine("Hello, Let Me Check Your Bingo Boards!"); var boards = new List <IBoard <int> > { new Board1(), new Board2(), new Board3(), new Board4(), }; var i = 1; foreach (var board in boards) { var numbers = board.GetNumbers(); var matches = ReadNumbers.Intersect(numbers).ToList(); Console.WriteLine($"Board {i} - Matches {matches.Count}"); Console.WriteLine($"Matches: {string.Join(',', matches)}"); if (matches.Count >= 24) { Console.WriteLine($"I think you have a BINGO on Board {i}"); } i++; } Console.WriteLine("Checked Your Boards"); }
static void Main(string[] args) { //Number refrence files string path = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"Images"); FileInfo[] numbers = new DirectoryInfo(path + "\\Numbers").GetFiles(); //example number image to read Bitmap exampleImage = new Bitmap(path + "\\Samples\\sample1.PNG"); ReadNumbers ocr = new ReadNumbers(); var result = ocr.ReadNumber(exampleImage, numbers); Console.WriteLine(result); }