hr[i].show;
end;
{***********************************************************}
procedure tnew;
begin
I:=0;
REPEAT
I:=I+1;
x:=tg[i].getx;
y:=tg[i].gety;
AT:=TG[I].DAIAGE;
CTP:=TG[I].DAIZWET;
if (z mod 365)=0 then
BEGIN
at:=at+1; {Happy New Year!}
TG[I].INIT(X,Y,AT,CTP);
END;
if at>v then {Old ?}
tg[i].done;
-11-
tg[i].init(0,0,0,0);
tt:=tt+1;{умершее животное}
for j:=i+1 to g do
x1:=tg[j].getx;
y1:=tg[j].gety;
at1:=tg[j].daiage;
ct1:=tg[j].daizwet;
tg[j].done;
tg[j-1].init(x1,y1,at1,ct1);
tg[j-1].show;
TG[G].INIT(0,0,0,0);
G:=G-1;
I:=I-1;
CONTINUE;
x:=x+(random(3)-1);
y:=y+(random(3)-1);
if x<5 then x:=6;if x>635 then x:=634;if y<17 then y:=18;
if y>480 then y:=479;
IF CT<>0 THEN
tg[i].init(x,y,at,CTP);
tg[i].show;
UNTIL I>=G;
procedure trod;
if (z mod 365)=0 then {Happy New Year!}
t:=0;
for i:=1 to g do
at:=tg[i].daiage;
if (tmin<=at) AND (AT<=tmax) then t:=t+1;
t:=(t div 2);
x:=0;
if t>0 then
FOR I:=1 TO T DO
J:=RANDOM(TP);
x:=x+j;
for y:=g+1 to g+1+x do
-12-
tg[y].init((random(630)+5),(random(462)+18),0,ct);
tg[y].show;
if y>4100 then break;
g:=g+1+x;
if g>4000 then
key:=true;
end
else
procedure hnew;
x:=hr[i].getx;
y:=hr[i].gety;
At:=hr[I].DAIAGE;
CTp:=hr[I].DAIZWET;
hr[I].INIT(X,Y,At,CTp);
if at>w then {Old ?}
hr[i].done;
hr[i].init(0,0,0,0);
for j:=i+1 to m do
x1:=hr[j].getx;
y1:=hr[j].gety;
at1:=hr[j].daiage;
ct1:=hr[j].daizwet;
hr[j].done;
hr[j-1].init(x1,y1,at1,ct1);
hr[j-1].show;
hr[m].INIT(0,0,0,0);
m:=m-1;
-13-
AT:=hr[I].DAIAGE;
IF CTp<>0 THEN
hr[i].init(x,y,at,CTp);
UNTIL I>=m;
{**********************************************************}
procedure hrod;
for i:=1 to m do
at:=hr[i].daiage;
if (hmin<=at) AND (AT<=hmax) then t:=t+1;
J:=RANDOM(hP);
for y:=m+1 to m+1+x do
hr[y].init((random(630)+5),(random(462)+18),0,ch);
hr[y].show;
m:=m+1+x;
if (m>1000) or (m<=0) then
procedure dead;{хищники едеят в радиусе 1 пиксель}
j:=0;
repeat
j:=j+1;
-14-
if ((x=x1)and(y=y1))or((x=x1)and(y=y1-1))or((x=x1)
and(y=y1+1))or((x=x1-1)and(y=y1))or((x=x1-1)and(y=y1-1))
or((x=x1-1)and(y=y1+1))or((x=x1+1)and(y=y1))or((x=x1+1)and
(y=y1-1))or((x=x1+1)and(y=y1+1))then
tg[j].init(0,0,0,0);
tt:=tt+1;
k:=j;
k:=k+1;
x1:=tg[k].getx;
y1:=tg[k].gety;
at1:=tg[k].daiage;
ct1:=tg[k].daizwet;
tg[k].done;
tg[k-1].init(x1,y1,at1,ct1);
tg[k-1].show;
until k>=g;
j:=j-1;
until j>=g;
procedure havka;
if ((z mod 365)=0) and (tt>0) then
x1:=(tt div ht);{сколько прокормилось в этом году}
y1:=w;{max vozrast}
if x1=0 then
if (x1<m) and (x1<>0) then
if hr[j].daiage=y1 then
hr[j].init(0,0,0,0);
for i:=j+1 to m do
-15-
at1:=hr[i].daiage;
ct1:=hr[i].daizwet;
hr[i-1].init(x,y,at1,ct1);
HR[i-1].show;
hr[m].init(0,0,0,0);
if m<=0 then
break;
if j>=m then
y1:=y1-1;
if m<=0 then break;
until x1=m
procedure tmor;{мор травоядных}
y:=g-x;
if x>0 then
j:=random(g)+1;
for i:=j+1 to g do
x1:=tg[i].getx;
y1:=tg[i].gety;
at1:=tg[i].daiage;
ct1:=tg[i].daizwet;
tg[i-1].init(x1,y1,at1,ct1);
tg[i-1].show;
tg[g].done;
tg[g].init(0,0,0,0);
g:=g-1;
until y=g;
-16-
procedure hmor;{мор хищников}
y:=m-x;
j:=random(m)+1;
x1:=hr[i].getx;
y1:=hr[i].gety;
hr[i-1].init(x1,y1,at1,ct1);
hr[i-1].show;
hr[m].done;
until m=y;
procedure zasux;{засуха}
tree:=tree - random(round(tree/10));
procedure quit;
window(1,1,80,25);
fon(black);
clrscr;
GOTOXY(1,24);
txt(White);
WRITELN(' --------------------------------------------------
----------------------------');
txt(yellow);
WRITELN(' Antony Sokolov | FidoNet 2:5078/20.4 AKA
2:5078/20.666 AKA 2:5078/22.666');
procedure herb;{травоядные}
colorwind(3,20,77,25,black,yellow);
gotoxy(32,1);
writeln('Правила ввода для травоядных');
gotoxy(2,2);write('Кол-во травоядных не более 3000.');
write(' Корм на месяц в килограммах. ');gotoxy(2,3);
-17-
write('Помет - кол-во детенышей. ');write('Цвет вывода от 1
до 15');
colorwind(40,10,65,19,black,green);
gotoxy(6,1);
txt(Yellow);
write('Травоядные');
gotoxy(2,2);
write('Кол-во: '); {начальное кол-во травоядных}
readln(g);
gotoxy(2,3);
write('Корм : ');{кол-во корма в год на одного
травоядного}
readln(ttt);
ttt:=ttt/1000;
gotoxy(2,4);
write('Помет: '); {рождаемость}
readln(tp);
gotoxy(2,5);
write('Min детородный: ');
read(tmin);
gotoxy(2,6);
write('Max детородный: ');
read(tmax);
gotoxy(2,7);
write('Max возрaст: ');
read(v);
gotoxy(2,8);
write('Цвет вывода: ');
read(ct);
colorwind(3,20,77,25,black,black);
procedure beast; {хищники}
writeln('Правила ввода для хищников');
gotoxy(2,2);write('Кол-во хищников не более 1000.');
write(' Корм - кол-во травоядных в год. ');gotoxy(2,3);
colorwind(40,10,65,19,black,red);
gotoxy(8,1);
write('Хищники');
write('Кол-во: ');
readln(m);
write('Корм: ');{начальное кол-во хищников}
readln(ht);
write('Помет: ');{рождаемость}
-18-
readln(hp);
write('Min детородный: '); {естественная смертность}
Страницы: 1, 2, 3