public int findColDown(kakuroSquare square) { int length = 0; int col = square.getCol(); int row = square.getRow(); while (true) { row++; Debug.WriteLine("FindDown col is " + col + " row @" + row); if (row <= squareCol.ElementAt(col).Count() - 1) { Debug.WriteLine("row (" + row + ") is smaller than " + squareCol.ElementAt(col).Count()); kakuroSquare nextsqaure = squareCol.ElementAt(col).ElementAt(row); if (nextsqaure.getMode() == 0) { length++; } else { break; } } else { break; } } return(length); }
public int findRowAcross(kakuroSquare square) { Debug.WriteLine("finding Across length"); int length = 0; int col = square.getCol(); int row = square.getRow(); while (true) { col++; Debug.WriteLine("FindAcross row is " + row + " col @" + col); if (col <= squareCol.Count() - 1) { Debug.WriteLine("col (" + col + ") is smaller than " + squareCol.Count()); kakuroSquare nextsqaure = squareCol.ElementAt(col).ElementAt(row); if (nextsqaure.getMode() == 0) { length++; } else { break; } } else { break; } } return(length); }