Example #1
0
        private void CheckPuzzle(object sender, EventArgs args)
        {
            bool valid;

            (valid, duplicates) = check.CheckBoard(board.GetBoard(), true);
            board.SetDuplicates(duplicates);

            if (valid)
            {
                checkResult.ForeColor = Color.DarkGreen;
                checkResult.Text      = "Valid";
                if (solveResult.Text == "Puzzle")
                {
                    solveResult.ForeColor = Color.Black;
                    solveResult.Text      = "----------";
                }
            }
            else
            {
                checkResult.ForeColor = Color.Red;
                checkResult.Text      = "Invalid";
                solveResult.ForeColor = Color.Red;
                solveResult.Text      = "Puzzle";
            }
        }