From 871beb116f24545e797602820b10473f67d25eb3 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 2 Oct 2018 10:54:57 +0200 Subject: sudoku repariert --- raetsel.lps | 114 ++++++++++++++++++++++++++++++++++++-------------------- raetselunit.inc | 4 +- raetselunit.pas | 4 +- 3 files changed, 78 insertions(+), 44 deletions(-) diff --git a/raetsel.lps b/raetsel.lps index 011dd81..cf560a8 100644 --- a/raetsel.lps +++ b/raetsel.lps @@ -2,14 +2,14 @@ - + - + @@ -18,7 +18,7 @@ - + @@ -30,25 +30,25 @@ - + - - - + + + - - - + + + @@ -90,7 +90,7 @@ - + @@ -154,94 +154,126 @@ - + - + - + - + - + - + - + - - + + - + - + - - + + - + - + - - + + - + - - + - - + + - - + + - + + - + - - + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/raetselunit.inc b/raetselunit.inc index e319ea1..5b7ffe0 100644 --- a/raetselunit.inc +++ b/raetselunit.inc @@ -96,8 +96,8 @@ begin S:=0; K:=0; if sudokuCB.checked then begin - KZ:=(Zeile div dim)*dim; - KS:=(Spalte div dim)*dim; + KZ:=(Zeile div NSqrt)*NSqrt; + KS:=(Spalte div NSqrt)*NSqrt; for I:=0 to dim-1 do begin {$IFDEF buchstaben} W:=W*(groeszen[0]+2)+inhalt[Zeile*dim+I]+1; diff --git a/raetselunit.pas b/raetselunit.pas index 1819408..982d7ff 100644 --- a/raetselunit.pas +++ b/raetselunit.pas @@ -676,7 +676,7 @@ var begin zeichenflaeche.canvas.brush.color:=$ffffff; zeichenflaeche.canvas.rectangle(-10,-10,zeichenflaeche.width+10,zeichenflaeche.height+10); - zeichenflaeche.canvas.pen.width:=3; + zeichenflaeche.canvas.pen.width:=3-2*byte(sudokuCB.checked); zeichenflaeche.canvas.pen.color:=$000000; if diagonalenCB.checked then for i:=1 to dim do begin @@ -696,11 +696,13 @@ begin end; for i:=0 to dim do with zeichenflaeche.canvas do begin + pen.width:=3-2*byte(sudokuCB.checked and (i mod nSqrt <> 0)); moveTo(round((i+1)*zellGroesze),round(zellGroesze)); lineTo(round((i+1)*zellGroesze),round((dim+1)*zellGroesze)); moveTo(round(zellGroesze),round((i+1)*zellGroesze)); lineTo(round((dim+1)*zellGroesze),round((i+1)*zellGroesze)); end; + zeichenflaeche.canvas.pen.width:=3; zeichenflaeche.canvas.pen.color:=$8080ff; if (cursorPosition>=0) and (dim>0) then begin zeichenflaeche.canvas.brush.color:= -- cgit v1.2.3-70-g09d2