: = 2; tmax: = 28;
hmin: = 3; hmax: = 24;
tp: = 3; hp: = 7; {дітородного}
kata: = 9; ht: = 3; ttt: = 1; tree: = 1300; tr: = 15.1;
hiddencursor;
GKMENU;
end.
-24 - br/>
Додаток 2. <В
Бібліотека Fauna1
{Init object}
unit fauna1;
interface
uses graph;
Type TPosition = object
x, y: integer;
procedure Init (x0, y0: integer);
function getx: integer;
function gety: integer;
end;
type Tosob = object (TPosition)
color: word;
vidno: boolean;
AGE: INTEGER;
constructor Init (x0, y0, age0: integer; col: word);
destructor Done; virtual;
procedure Show; virtual;
procedure Blind; virtual;
function Daizwet: word;
function VidnoLi: boolean;
FUNCTION DAIAGE: INTEGER;
end;
Posob = ^ Tosob;
{metod Tposition}
Implementation
Procedure Tposition.Init (x0, y0: integer);
Begin
x: = x0;
y: = y0;
End;
Function Tposition.Getx: integer;
Begin GetX: = x End;
Function Tposition.Gety: integer;
Begin Gety: = y End;
Constructor Tosob.Init (x0, y0, age0: integer; col: word);
Begin
Tposition.Init (x0, y0);
AGE: = AGE0;
color: = col;
vidno: = false;
End;
Destructor Tosob.Done;
Begin
Tosob.blind;
End;
procedure Tosob.Show;
Begin
putpixel (TPosition.GetX, TPosition.GetY, color);
vidno: = True;
End;
procedure Tosob.Blind;
-25 - br/>
Begin
putpixel (TPosition.GetX, TPosition.GetY, GetBKColor);
vidno: = False;
End;
Function Tosob.Daizwet: word;
Begin Daizwet: = color End;
Function Tosob.VidnoLi: Boolean;
Begin VidnoLi: = Vidno End;
FUNCTION TOSOB.DAIAGE: INTEGER;
BEGIN DAIAGE: = AGE END;
End.
-26 - br/>
Додаток 3.
Бібліотека Mycrt
В
unit Mycrt;
interface
uses tpcrt, dos;
procedure fon (x: byte);
procedure txt (col: byte);
procedure ramka (x1, y1, x2, y2: integer);
procedure colorwind (v1, v2, v3, v4, fon, text: byte);
FUNCTION COLWORD (COL: BYTE): STRING;
function mes (z: longint): string;
implementation
{********************************************** *************}
function mes;
var col: string;
...