= x1-1) and (y = y1)) or ((x = x1-1) and (y = y1-1)) p> or ((x = x1-1) and (y = y1 +1)) or ((x = x1 +1) and (y = y1)) or ((x = x1 +1) and p> (y = y1-1)) or ((x = x1 +1) and (y = y1 +1)) then p> begin p> tg [j]. Done; p> tg [j]. Init (0,0,0,0); p> tt: = tt +1; p> k: = j; p> repeat p> k: = k +1; p> x1: = tg [k]. Getx; p> y1: = tg [k]. Gety; p> at1: = tg [k]. Daiage; p> ct1: = tg [k]. Daizwet; p> tg [k]. Done; p> tg [k-1]. Init (x1, y1, at1, ct1); p> tg [k-1]. Show; p> until k> = g; p> TG [G]. INIT (0,0,0,0); p> G: = G-1; p> j: = j-1; p> end p> else p> begin p> end; p> until j> = g; p> end; p> end; p> {****************************************** ****************} p> procedure havka; p> begin p> if ((z mod 365) = 0) and (tt> 0) then p> begin p> x1: = (tt div ht); {скільки прогодуватися в цьому році} p> j: = 0; p> y1: = w; {max vozrast} p> if x1 = 0 then p> begin p> for i: = 1 to m do p> begin p> hr [i]. Init (0,0,0,0); p> hr [i]. Done; p> end; p> end; p> if (x1 0) then p> begin p> repeat p> j: = j +1; p> if hr [j]. Daiage = y1 then p> begin p> hr [j]. Done; p> hr [j]. Init (0,0,0,0); p> for i: = j +1 to m do p> begin p> x: = hr [i]. Getx; p> y: = hr [i]. Gety; p> at1: = hr [i]. Daiage; p> ct1: = hr [i]. Daizwet; p> hr [i]. Done; p> hr [i-1]. Init (x, y, at1, ct1); p> HR [i-1]. Show; p> end; p> hr [m]. Init (0,0,0,0); p> m: = m-1; p> if m <= 0 then p> begin p> key: = true; p> break; p> end; p> end; p> if j> = m then p> begin p> j: = 0; p> y1: = y1-1; p> end; p> if m <= 0 then break; p> until x1 = m p> end; p> end; p> end; p> {****************************************** *****************} p> procedure tmor; {мор травоїдних} p> begin p> y: = g-x; p> if x> 0 then p> begin p> repeat p> j: = random (g) +1; p> tg [j]. Done; p> tg [j]. Init (0,0,0,0); p> tt: = tt +1; p> for i: = j +1 to g do p> begin p> x1: = tg [i]. Getx; p> y1: = tg [i]. Gety; p> at1: = tg [i]. Daiage; p> ct1: = tg [i]. Daizwet; p> tg [i]. Done; p> tg [i-1]. Init (x1, y1, at1, ct1); p> tg [i-1]. Show; p> end; p> tg [g]. Done; p> tg [g]. Init (0,0,0,0); p> g: = g-1; p> until y = g; p> end; p> end; p> {****************************************** *****************} p> p> procedure hmor; {мор хижаків} p> begin p> y: = m-x; p> if x> 0 then p> begin p> repeat p> j: = random (m) +1; p> hr [j]. Done; p> hr [j]. Init (0,0,0,0); p> for i: = j +1 to m do p> begin p> x1: = hr [i]. Getx; p> y1: = hr [i]. Gety; p> at1: = hr [i]. Daiage; p> ct1: = hr [i]. Daizwet; p> hr [i]. Done; p> hr [i-1]. Init (x1, y1, at1, ct1); p> hr [i-1]. Show; p> end; p> hr [m]. Done; p> hr [m]. Init (0,0,0,0); p> m: = m-1; p> until m = y; p> end; p> end; p> {****************************************** *****************} p> procedure zasux; {посуха} p> begin p> tree: = tree - random (round (tree/10)); p> end; p> {****************************************** *****************} p> procedure quit; p> begin p> window (1,1,80,25); p> fon (black); p> clrscr; p> GOTOXY (1,24); p> txt (White); p> p> end; p> {***********...