Программа эмуляции развития

??????? ?? ?? ???????? ??????? "???", ? ?????? ?????? ??????????? ? ???? ????? ??????? ??????????? ????? - ???? ??????? ???P>-
?????? ????????????????? ?????????
???????????? ????????????????? ??? ??????? ?????? ?????? ??? ??? ??????????? ? ??????????? ???? ?? ??????????? ?? ???????
????? ???????????????????? ?????????? ?????? ? ?????, ????? ?? ?????? ???? ?????? ????? ?????, ??????? ????? ?? ????? ??? ??????,
???????????? ????? ????, ?? ????? ????????? ????? ?????? ?????? ???. ??? ??????????????? ?? ? ????? ????? ?? ???????????? ??
????? ?????? ????? ????? ???? ????????? ???????? ????-???????? ??? Borland
Pascal 7.1 ??????? ????????? ?? tosob ????? ????????? fauna1. ?????????????????? ????? ??????
?????????: - ????? ??????? ??? ? ??? ???????????? ???? ?? ??? ????????? ???"uses"
???????????? ???????????? ??? TPCRT, GRAPH, DOS ??????? ??? ????? ??????????????MYCRT ?FAUNA1. -
q,x,y,x1,y1,t,i,j,k,at,at1,ct1,ctp ?? integer ?? ??????? ? ??? ??? - ct,ch ?? shortint ?? ???? ?????????
???P>- tmin,tmax,hmin,hmax,tp,hp ?? integer ?? ???? ???? ?????? ???????? ???? - ht ?? integer ?? ????
????? ????? ??? ?????? ?? - tree,tree1 ?? longint ?? ???? ???????????? ???P>- z ?? longint ?? ???? ????P>-
key ?? boolean ?? ?????? ???? ??? GRAPH ?? ???? ?? ????????????????????? 2.3
???????? ?????????? FAUNA1 y - ?????? ? ????? Y ????P>??????? ???? x -
?????? ? ????? ? ????P> y - ?????? ? ????? Y ????P> age - ???????P> col - ?? ??? ? ???
blind - ???????P> show - ?????????P> init - ???? ????Tosob ? ??? ????? ???? ???????????????????? ???
?????????. colorwind - ????? ???? mes - ??????? ???? ?? ? ??? ?????? ?? ???? ????????? ini - ???? ??? ???? hr ?tr ?
????? ??????P> tnew - ???? ??????????????tr ?????????? dead - ????????? ???????tr ??? ????hr hmor
- ?????????? ????? ????? ???????hr beast - ?????? ???????????? ????? ?? ????hr
omenu - ????? ?? Option ???? ??????????? ????? ??? ???
????????????????? ????????. ???? ?? ??????????????? ????? ???? ??????????????? ?? ?????????? ???????????? ????,
??????????????????? ????? ????. ?????????????????: ???? ????????????????? ???? ???? ? ???????? ? ???
Pascal.
q,x,y,x1,y1,gd,gm,t,i,j,k,AT,at1,ct1,ctp:integer;{??? tt:integer;{????????
????? ? 1 ?? tg:array[1..4400] of tosob; {green-?????} {***********************************************************} tg[i].init((random(630)+5),(random(462)+18),at,ct);
HR[i].init((random(630)+5),(random(462)+18),at,ch); begin CTP:=TG[I].DAIZWET; if at>v then {Old ?} x1:=tg[j].getx; tg[j-1].show;
x:=x+(random(3)-1); if y>480 then y:=479;
tg[i].init(x,y,at,CTP); {***********************************************************} begin if t>0 then
tg[y].init((random(630)+5),(random(462)+18),0,ct); end; pr
ocedure hnew; CTp:=hr[I].DAIZWET; if at>w then {Old ?} y1:=hr[j].gety; end; x:=x+(random(3)-1); if
y>480 then y:=479; hr[i].init(x,y,at,CTp); {**********************************************************} begin begin
hr[y].init((random(630)+5),(random(462)+18),0,ch);
end; for i:=1 to m do if ((x=x1)and(y=y1))or((x=x1)and(y=y1-
1))or((x=x1) or((x=x1-1)and(y=y1+1))or((x=x1+1)and(y=y1))or((x=x1+1)and repeat tg[k-1].init(x1,y1,at1,ct1); until j>=g; if ((z mod 365)=0) and (tt>0) then for i:=1 to m do
repeat x:=hr[i].getx; HR[i-1].show;
if j>=m then {***********************************************************} tg[j].done;
at1:=tg[i].daiage;
tg[g].init(0,0,0,0); procedure hmor;{??????} for i:=j+1
to m do hr[i-1].init(x1,y1,at1,ct1); {***********************************************************} {**********************************************
*************} end; colorwind(3,20,77,25,black,yellow); write(' ???? ?????????? ');gotoxy(2,3);
txt(Yellow); gotoxy(2,3); write('???: '); {?????? read(tmax);
colorwind(3,20,77,25,black,black);
colorwind(3,20,77,25,black,yellow); write(' ???- ??? ????? ??? ');gotoxy(2,3); txt(Yellow); write('??? ');{???????? ????}
write('Min ?????: '); {?????? ?????} write('Max ???? '); {?????? ?????} {*************************************
**********************} writeln('???? ????? ???);
write('?????? 0 ??1 - ?? 2 ??????.'); gotoxy(13,1); ?? ?? ????? ??? readln(kata); {*************************************
**********************} gotoxy(2,2);write('??????-',g,'
?????',m); write('Max ????????? ',v,', ???? ',w); write('?????????????? ? ',hmin,' ?
',hmax); str(tr:1:2,s);
gotoxy(2,10);write('?????? ??????',s); {***********************************************************} gotoxy(5,2);
write('ption '); {***********************************************************}
write('H'); writeln('east of prey'); {****************************************************
*******} z:=0;{??? ??} if ((z mod 365)=0) or
((z mod 365)=31) or ((z mod 365)=59) ((z mod 365)=242) or ((z mod 365)=273) or ((z mod tree:=tree+round(tree*(tr/100));{??????????? else for i:=j+1
to g do tg[i-1].init(x1,y1,at1,ct1); if g>0 then tnew;{?????? ????? ?????} hrod;{???? ????} x:=random(4); Outtext('???? ????? ??? '); moveto(320,240);setcolor(Lightred);str(x,s); moveto(320,240);setcolor(Lightred); begin Outtext('?????????? ');Outtext(s);Outtext('
str(tree1,s);Outtext(s);Outtext(' ?? ???); if
g>4000 then break;
setcolor(white); setcolor(ct);moveto(0,10);str(g,s);outtext(s);
setcolor(green);moveto(400,10);str((tree),s);outtext(s); if (z mod 365)=0 then tt:=0; procedure komenu; window(40,10,80,25); window(40,10,80,25);
window(40,10,80,25); {***********************************************************} if (key2='s') or (key2='S')
then
and(ct>0)and(ht>0)and(hp>0)and(hmin>0)and(hmax>0)and end; if (key2='q') or (key2='Q')or(key2=#27) then {***********************************************************}
ct:=yellow;ch:=red; hiddencursor;
Type TPosition=object end; constructor Init(x0,y0,age0:integer;col:word); function
Daizwet : word; Implementation Function
Tposition.Getx:integer; Constructor
Tosob.Init(x0,y0,age0:integer;col:word); Begin vidno:=True; vidno:=False;
Begin VidnoLi:=Vidno End; unit Mycrt; procedure
ramka(x1,y1,x2,y2:integer); function
mes(z:longint):string; x:integer; if
(x>=31)and(x<=58) then col:='????'; if
(x>=120)and(x<=150) then col:='??'; if
(x>=212)and(x<=241) then col:='????; if
(x>=304)and(x<=335) then col:='????; {***********************************************************} IF COL=2 THEN
COLO:='???????'; IF COL=6 THEN COLO:='??????????'; IF COL=9
THEN COLO:='??????-?????'; IF COL=12 THEN COLO:='??????-???????';
COLWORD:=COLO; textbackground(x); textcolor(col); a=#186;b=#187;c=#188;d=#200;e=#201;f=#205; for i:=(x1+1) to (x2-1)do write(f); end; {***********************************************************} textcolor(text); e
nd. ??????????? ???? ??????? ??, ???? ????: 'Start', 'Option', 'Quit'. ??????
?? 'Option' ????? ????????? 'O' ??'o'. ? ????? ????? ????? - 'Herbivorous', 'Beast of prey',
'Environment'. ?? ????'H' ??'h' ???????? ??????????. ?? ????'B' ??'b' ???????? ?????????. ?? ????'E' ??'e'
???????? ?????????????? ?? ???????? ????, ????? ???????????? ?????????? ???????? ???????