public bool HasSolution()
{
Cell cell = this.GetMinUnsolved();
if (cell == null)
return true;
if (this.IsValidRowMove(cell.Row, cell.Value))
{
this.MoveRow(cell.Row, cell.Value);
if (this.HasSolution())
return true;
this.MoveRow(cell.Row, 0);
}
if (this.IsValidColumnMove(cell.Column, cell.Value))
{
this.MoveColumn(cell.Column, cell.Value);
if (this.HasSolution())
return true;
this.MoveColumn(cell.Column, 0);
}
return false;
}