From aba523b2d0815b4d900b387044abda19995c0973 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sun, 30 Sep 2018 21:13:57 +0200 Subject: ein Anfang --- raetsel.lpi | 5 +--- raetsel.lps | 71 +++++++++++++++++++++++++++++---------------------------- raetselunit.pas | 45 +++++++++++++++++++++++++----------- 3 files changed, 69 insertions(+), 52 deletions(-) diff --git a/raetsel.lpi b/raetsel.lpi index 4ed092d..618272c 100644 --- a/raetsel.lpi +++ b/raetsel.lpi @@ -1,7 +1,7 @@ - + @@ -13,9 +13,6 @@ - - - diff --git a/raetsel.lps b/raetsel.lps index fc7dde7..3b8bb0d 100644 --- a/raetsel.lps +++ b/raetsel.lps @@ -1,7 +1,7 @@ - + @@ -18,7 +18,7 @@ - + @@ -41,8 +41,8 @@ - - + + @@ -93,8 +93,8 @@ - - + + @@ -102,121 +102,122 @@ - + - + + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - + - + - + - + - + - - + - + - + diff --git a/raetselunit.pas b/raetselunit.pas index a2c069e..a5c63d5 100644 --- a/raetselunit.pas +++ b/raetselunit.pas @@ -150,6 +150,16 @@ begin dec(_posi); end; +procedure tFelderLoesMeta.aktualisiereInhalt(p: longint); +begin + +end; + +procedure tFelderLoesMeta.aktualisiereRand(p: longint); +begin + +end; + // tRaetsel ******************************************************************** constructor tRaetsel.create(aOwner: tForm); @@ -220,18 +230,22 @@ begin setlength(groeszen,length(spinEdits)-1); for i:=0 to length(spinEdits)-1 do begin spinEdits[i]:=tSpinEdit.create(besitzer); + if i=1 then + groeszen[i-1]:=5 + else if i>1 then + groeszen[i-1]:=1; with spinEdits[i] do begin parent:=besitzer; top:=erzeugeBtn.top+erzeugeBtn.height+spacing; - if i>0 then + if i>0 then begin left:=spinEdits[i-1].left + spinEdits[i-1].width; + value:=groeszen[i-1]; + end; left:=left+spacing; onChange:=@anzSEsOnChange; onKeyDown:=@self.onKeyDown; tag:=i; end; - if i>0 then - groeszen[i-1]:=-1; end; spinEdits[0].showHint:=true; spinEdits[0].hint:='Schriftgröße'; @@ -315,8 +329,8 @@ begin dim:=dim+groeszen[i]; end; setlength(inhalt,dim*dim); - setlength(rand,4*dim); - leeren; + setlength(rand,4*(dim+1)); + loeschen; cursorPosition:=0; aktualisiereZeichenflaechenGroesze; end; @@ -361,7 +375,7 @@ begin end; end; - p:=permutation(dim*4); + p:=permutation((dim+1)*4); for i:=0 to length(p)-1 do begin if rand[p[i]]<0 then continue; w:=rand[p[i]]; @@ -514,7 +528,7 @@ begin end; result:=0; - for + //for if not lm.inhaltBehalten then begin inhalt[lm.posi]:=-1; @@ -560,7 +574,7 @@ begin result:=false; end; -function tHochhausRaetsel._loesen(inhaltBehalten: boolean; perm: tLongintArray; posi: longint): longint; +function tHochhausRaetsel._loesen(lm: tFelderLoesMeta): longint; begin end; @@ -569,8 +583,10 @@ end; function buchstabenAlphabetFunktion(i: longint): string; begin - if i<0 then result:='' - else if i=0 then result:='-' + if i<0 then + result:='' + else if i=0 then + result:='-' else begin result:=''; while i>0 do begin @@ -583,9 +599,12 @@ end; function zahlenAlphabetFunktion(i: longint): string; begin - if i<0 then result:='' - else if i=0 then result:='-' - else result:=inttostr(i); + if i<0 then + result:='' + else if i=0 then + result:='-' + else + result:=inttostr(i); end; end. -- cgit v1.2.3-54-g00ecf