summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-10-02 10:54:57 +0200
committerErich Eckner <git@eckner.net>2018-10-02 10:54:57 +0200
commit871beb116f24545e797602820b10473f67d25eb3 (patch)
tree94e11f98356655092955748c5aef270231380c49
parent842e89c229ccc8d77c69622a6cc7e5fe974a33ae (diff)
downloadRaetsel-871beb116f24545e797602820b10473f67d25eb3.tar.xz
sudoku repariert
-rw-r--r--raetsel.lps114
-rw-r--r--raetselunit.inc4
-rw-r--r--raetselunit.pas4
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 @@
<CONFIG>
<ProjectSession>
<Version Value="10"/>
- <BuildModes Active="win10_64bits"/>
+ <BuildModes Active="linux_64bits"/>
<Units Count="20">
<Unit0>
<Filename Value="raetsel.lpr"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="2"/>
<CursorPos X="47" Y="11"/>
- <UsageCount Value="59"/>
+ <UsageCount Value="61"/>
<Loaded Value="True"/>
</Unit0>
<Unit1>
@@ -18,7 +18,7 @@
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
- <UsageCount Value="59"/>
+ <UsageCount Value="61"/>
<Loaded Value="True"/>
</Unit1>
<Unit2>
@@ -30,25 +30,25 @@
<UnitName Value="Unit2"/>
<EditorIndex Value="-1"/>
<CursorPos Y="17"/>
- <UsageCount Value="58"/>
+ <UsageCount Value="60"/>
</Unit2>
<Unit3>
<Filename Value="raetselunit.pas"/>
<IsPartOfProject Value="True"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="1"/>
- <TopLine Value="637"/>
- <CursorPos X="99" Y="649"/>
- <UsageCount Value="53"/>
+ <TopLine Value="332"/>
+ <CursorPos Y="332"/>
+ <UsageCount Value="55"/>
<Loaded Value="True"/>
</Unit3>
<Unit4>
<Filename Value="raetselunit.inc"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="3"/>
- <TopLine Value="785"/>
- <CursorPos Y="807"/>
- <UsageCount Value="39"/>
+ <TopLine Value="437"/>
+ <CursorPos X="33" Y="100"/>
+ <UsageCount Value="41"/>
<Loaded Value="True"/>
</Unit4>
<Unit5>
@@ -90,7 +90,7 @@
<EditorIndex Value="4"/>
<TopLine Value="2341"/>
<CursorPos X="13" Y="2380"/>
- <UsageCount Value="20"/>
+ <UsageCount Value="21"/>
<Loaded Value="True"/>
</Unit10>
<Unit11>
@@ -154,94 +154,126 @@
<UsageCount Value="10"/>
</Unit19>
</Units>
- <JumpHistory Count="22" HistoryIndex="21">
+ <JumpHistory Count="30" HistoryIndex="29">
<Position1>
<Filename Value="raetselunit.pas"/>
- <Caret Line="408" Column="39" TopLine="373"/>
+ <Caret Line="240" Column="42" TopLine="217"/>
</Position1>
<Position2>
<Filename Value="raetselunit.pas"/>
- <Caret Line="43" Column="13" TopLine="21"/>
+ <Caret Line="234" Column="29" TopLine="217"/>
</Position2>
<Position3>
<Filename Value="raetselunit.pas"/>
- <Caret Line="238" Column="18" TopLine="203"/>
+ <Caret Line="59" Column="21" TopLine="39"/>
</Position3>
<Position4>
<Filename Value="raetselunit.pas"/>
- <Caret Line="240" Column="42" TopLine="217"/>
+ <Caret Line="93" Column="21" TopLine="57"/>
</Position4>
<Position5>
<Filename Value="raetselunit.pas"/>
- <Caret Line="234" Column="29" TopLine="217"/>
+ <Caret Line="326" Column="4" TopLine="305"/>
</Position5>
<Position6>
<Filename Value="raetselunit.pas"/>
- <Caret Line="59" Column="21" TopLine="39"/>
+ <Caret Line="328" Column="36" TopLine="305"/>
</Position6>
<Position7>
- <Filename Value="raetselunit.pas"/>
- <Caret Line="93" Column="21" TopLine="57"/>
+ <Filename Value="unit1.pas"/>
+ <Caret Line="52" TopLine="28"/>
</Position7>
<Position8>
<Filename Value="raetselunit.pas"/>
- <Caret Line="326" Column="4" TopLine="305"/>
+ <Caret Line="327" Column="3" TopLine="306"/>
</Position8>
<Position9>
<Filename Value="raetselunit.pas"/>
- <Caret Line="328" Column="36" TopLine="305"/>
+ <Caret Line="35" Column="39" TopLine="19"/>
</Position9>
<Position10>
- <Filename Value="unit1.pas"/>
- <Caret Line="52" TopLine="28"/>
+ <Filename Value="raetselunit.pas"/>
+ <Caret Line="331" Column="43" TopLine="308"/>
</Position10>
<Position11>
<Filename Value="raetselunit.pas"/>
- <Caret Line="327" Column="3" TopLine="306"/>
+ <Caret Line="330" Column="14" TopLine="309"/>
</Position11>
<Position12>
<Filename Value="raetselunit.pas"/>
- <Caret Line="35" Column="39" TopLine="19"/>
+ <Caret Line="35" Column="49"/>
</Position12>
<Position13>
- <Filename Value="raetselunit.pas"/>
- <Caret Line="331" Column="43" TopLine="308"/>
+ <Filename Value="unit1.pas"/>
+ <Caret Line="59" Column="25" TopLine="35"/>
</Position13>
<Position14>
<Filename Value="raetselunit.pas"/>
- <Caret Line="330" Column="14" TopLine="309"/>
+ <Caret Line="35" Column="49"/>
</Position14>
<Position15>
- <Filename Value="raetselunit.pas"/>
- <Caret Line="35" Column="49"/>
+ <Filename Value="unit1.pas"/>
</Position15>
<Position16>
- <Filename Value="unit1.pas"/>
- <Caret Line="59" Column="25" TopLine="35"/>
+ <Filename Value="raetselunit.pas"/>
+ <Caret Line="11" Column="3"/>
</Position16>
<Position17>
- <Filename Value="raetselunit.pas"/>
- <Caret Line="35" Column="49"/>
+ <Filename Value="raetsel.lpr"/>
+ <Caret Line="11" Column="47"/>
</Position17>
<Position18>
- <Filename Value="unit1.pas"/>
+ <Filename Value="raetselunit.pas"/>
+ <Caret Line="11" Column="3" TopLine="46"/>
</Position18>
<Position19>
<Filename Value="raetselunit.pas"/>
- <Caret Line="11" Column="3"/>
+ <Caret Line="375" Column="31" TopLine="343"/>
</Position19>
<Position20>
- <Filename Value="raetsel.lpr"/>
- <Caret Line="11" Column="47"/>
+ <Filename Value="raetselunit.pas"/>
+ <Caret Line="651" Column="53" TopLine="647"/>
</Position20>
<Position21>
<Filename Value="raetselunit.pas"/>
- <Caret Line="11" Column="3" TopLine="46"/>
+ <Caret Line="44" Column="35" TopLine="24"/>
</Position21>
<Position22>
<Filename Value="raetselunit.pas"/>
- <Caret Line="375" Column="31" TopLine="343"/>
+ <Caret Line="218" Column="10" TopLine="213"/>
</Position22>
+ <Position23>
+ <Filename Value="raetselunit.pas"/>
+ <Caret Line="40" Column="15" TopLine="20"/>
+ </Position23>
+ <Position24>
+ <Filename Value="raetselunit.pas"/>
+ <Caret Line="219" Column="37" TopLine="182"/>
+ </Position24>
+ <Position25>
+ <Filename Value="raetselunit.pas"/>
+ <Caret Line="54" Column="29" TopLine="34"/>
+ </Position25>
+ <Position26>
+ <Filename Value="raetselunit.pas"/>
+ <Caret Line="219" Column="38" TopLine="215"/>
+ </Position26>
+ <Position27>
+ <Filename Value="raetselunit.pas"/>
+ <Caret Line="332" Column="6" TopLine="316"/>
+ </Position27>
+ <Position28>
+ <Filename Value="raetselunit.pas"/>
+ <Caret Line="63" Column="20" TopLine="44"/>
+ </Position28>
+ <Position29>
+ <Filename Value="raetselunit.inc"/>
+ <Caret Line="807" TopLine="785"/>
+ </Position29>
+ <Position30>
+ <Filename Value="raetselunit.inc"/>
+ <Caret Line="14" Column="20"/>
+ </Position30>
</JumpHistory>
</ProjectSession>
<Debugging>
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:=