Example #1
0
        private static void Main(string[] args)
        {
            var fn    = args[0];
            var input = DominoReader.Read(fn);

            if (input.Any())
            {
                var brain = new CompositeBrain(input);
                brain.Parse();
                var board = brain.Board;
                PrintBoard(board);
            }
        }
Example #2
0
        private async void Button_Click(object sender, RoutedEventArgs e)
        {
            var fn = _fileName.Text;

            _input = DominoReader.Read(fn);
            _grid.Children.Clear();
            _grid.ColumnDefinitions.Clear();
            _grid.RowDefinitions.Clear();

            if (!_input.Any())
            {
                return;
            }

            DisplayInput();
            var board = await ParseBoard();

            DisplayBoard(board);
        }