diff --git a/applications/sudoku/scratchpad.pas b/applications/sudoku/scratchpad.pas
index 13a80c61d..002432b7a 100644
--- a/applications/sudoku/scratchpad.pas
+++ b/applications/sudoku/scratchpad.pas
@@ -38,28 +38,6 @@ implementation
{$R *.lfm}
-function DbgS( ASet: TDigitSet): String; overload;
-var
- D: TDigits;
-begin
- Result := '[';
- for D in ASet do
- begin
- Result := Result + IntToStr(D) + ',';
- end;
- if (Result[Length(Result)] = ',') then System.Delete(Result, Length(Result), 1);
- Result := Result + ']';
-end;
-
-function DbgS(ASquare: TSquare): String; overload;
-const
- BoolStr: Array[Boolean] of String = ('False','True');
-begin
- Result := '[Value: ' + IntToStr(ASquare.Value) + ', ';
- Result := Result + 'Locked: ' + BoolStr[ASquare.Locked] + ', ';
- Result := Result + 'DigitsPossible: ' + DbgS(ASquare.DigitsPossible) + ']';
-end;
-
{ TScratchForm }
procedure TScratchForm.FormActivate(Sender: TObject);
diff --git a/applications/sudoku/sudoku.lpi b/applications/sudoku/sudoku.lpi
index 4731faa6c..c042e12c4 100644
--- a/applications/sudoku/sudoku.lpi
+++ b/applications/sudoku/sudoku.lpi
@@ -81,6 +81,7 @@
+
diff --git a/applications/sudoku/sudokutype.pas b/applications/sudoku/sudokutype.pas
index b7589b289..70e0f63d4 100644
--- a/applications/sudoku/sudokutype.pas
+++ b/applications/sudoku/sudokutype.pas
@@ -56,12 +56,37 @@ type
//function Solved: Boolean;
end;
+function DbgS(ASet: TDigitSet): String; overload;
+function DbgS(ASquare: TSquare): String; overload;
+
implementation
const
cmin : Array[1..9] of Integer = (1, 1, 1, 4, 4, 4, 7, 7, 7);
cmax : Array[1..9] of Integer = (3, 3, 3, 6, 6, 6, 9, 9, 9);
+function DbgS(ASet: TDigitSet): String; overload;
+var
+ D: TDigits;
+begin
+ Result := '[';
+ for D in ASet do
+ begin
+ Result := Result + IntToStr(D) + ',';
+ end;
+ if (Result[Length(Result)] = ',') then System.Delete(Result, Length(Result), 1);
+ Result := Result + ']';
+end;
+
+function DbgS(ASquare: TSquare): String; overload;
+const
+ BoolStr: Array[Boolean] of String = ('False','True');
+begin
+ Result := '[Value: ' + IntToStr(ASquare.Value) + ', ';
+ Result := Result + 'Locked: ' + BoolStr[ASquare.Locked] + ', ';
+ Result := Result + 'DigitsPossible: ' + DbgS(ASquare.DigitsPossible) + ']';
+end;
+
{
Counts the number of TDigitSet in ASet.
aValue only has meaning if Result = 1 (which means this cell is solved)