Курсовая работа: Розробка гри Життя
for k:=0 to hor do
if new_gen[j,k]=1 then
circle(x_center[k],y_center[j],radius);
rule_plane;
setvisualpage(page);
end;
begin
init_screen;
repeat
randomize;
prob:=0.1+prob_factor*random;
outtextxy(0,0,'Game of life');
writeln;
outtextxy(0,15,'Live cells inserted at random,');
str(prob:3:3,ss);
outtextxy(0,30,'with probability '+ss);
outtextxy(0,60,'Press any key to start: ');
ch:=readkey;
cleardevice;
init_cells;
repeat
display;
if keypressed then
begin
ch:=readkey;
break;
end;
until false;
setviewport(0,0,getmaxx,getmaxy,clipon);