diff options
Diffstat (limited to 'raetselunit.pas')
-rw-r--r-- | raetselunit.pas | 45 |
1 files changed, 32 insertions, 13 deletions
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. |