summaryrefslogtreecommitdiff
path: root/hochhausunit.pas
diff options
context:
space:
mode:
Diffstat (limited to 'hochhausunit.pas')
-rw-r--r--hochhausunit.pas88
1 files changed, 0 insertions, 88 deletions
diff --git a/hochhausunit.pas b/hochhausunit.pas
deleted file mode 100644
index f53270c..0000000
--- a/hochhausunit.pas
+++ /dev/null
@@ -1,88 +0,0 @@
-unit hochhausunit;
-
-{$mode objfpc}{$H+}
-
-interface
-
-uses
- Classes, SysUtils, raetselunit, Forms;
-
-type
- tHochhausRaetsel = class(tFelderRaetsel)
- private
- procedure relativeInhaltsAenderung(diff: longint); override;
- function absoluteInhaltsAenderung(key: word): boolean; override;
- public
- constructor create(aOwner: tForm);
- destructor destroy; override;
- function gleichzeitigMoeglich(num: longint): longint; override;
- function _loesen(lm: tFelderLoesMeta): longint; override;
- end;
-
-function zahlenAlphabetFunktion(i: longint): string;
-
-implementation
-
-uses
- math;
-
-function zahlenAlphabetFunktion(i: longint): string;
-begin
- if i<0 then
- result:=''
- else if i=0 then
- result:='-'
- else
- result:=inttostr(i);
-end;
-
-// tHochhausRaetsel ************************************************************
-
-constructor tHochhausRaetsel.create(aOwner: tForm);
-begin
- inherited create(aOwner,1,@zahlenAlphabetFunktion);
- spinEdits[1].showHint:=true;
- spinEdits[1].hint:='Anzahl Spalten';
- spinEdits[1].value:=5;
- aktualisiereGroesze;
-end;
-
-destructor tHochhausRaetsel.destroy;
-begin
- inherited destroy;
-end;
-
-procedure tHochhausRaetsel.relativeInhaltsAenderung(diff: longint);
-begin
- if (cursorPosition<0) or (cursorPosition>=dim*dim) then exit;
- if inhalt[cursorPosition]=-1 then inhalt[cursorPosition]:=0;
- inhalt[cursorPosition]:=min(max(0,inhalt[cursorPosition]+diff),groeszen[0]);
- if inhalt[cursorPosition]=0 then inhalt[cursorPosition]:=-1;
-end;
-
-function tHochhausRaetsel.absoluteInhaltsAenderung(key: word): boolean;
-begin
- result:=true;
- if (key>=ord('1')) and (key<=min(ord('1')+groeszen[0]-1,ord('9'))) then begin
- inhalt[cursorPosition]:=key-ord('1')+1;
- exit;
- end;
- if (key=ord(' ')) or (key=46) or (key=8) then begin
- inhalt[cursorPosition]:=-1;
- exit;
- end;
- result:=false;
-end;
-
-function tHochhausRaetsel.gleichzeitigMoeglich(num: longint): longint;
-begin
- result:=1; // jede Höhe nur ein Mal
-end;
-
-function tHochhausRaetsel._loesen(lm: tFelderLoesMeta): longint;
-begin
-
-end;
-
-end.
-