static void Sudoku_PotentialSquareFound(Potential potential) { Console.WriteLine(string.Format("P Id {0}: {1} - {2} - {3}", potential.Square.Id.ToString("D2"), potential.Square.Number.ToString(), potential.Number.ToString(), potential.PotentialType.ToString())); }
/// <summary> /// When the PotentialSquare_Found event raises from a square or squareGroup, this method adds the potential square to the list. /// These squares will be checked in Solve method /// </summary> /// <param name="square"></param> void PotentialSquare_Found(Potential square) { if (!_PotentialSquares.Exists(p => p.Square.Id.Equals(square.Square.Id))) { _PotentialSquares.Add(square); if (PotentialSquareFound != null) PotentialSquareFound(square); } }