program Tzima;
uses graph,crt;
type
Polypoint = record
x,y:integer
end;
const
{stromek}
stromek_x: array[1..20] of Integer = (500,500,460,500,470,500,480,500,490,525,560,550,570,550,580,550,590,550,550,500);
stromek_y: array[1..20] of Integer = (450,420,420,400,400,370,370,350,350,310,350,350,370,370,400,400,420,420,450,450);
strecha: array[1..4] of Polypoint = ((x: 260; y:290),(x: 345; y:200),(x: 430; y:290),(x: 260; y:290));
strecha_bouda: array[1..3] of Polypoint = ((x:180; y:400), (x:205; y:380), (x:230; y:400));
var gm,gd,i:integer;
begin
initgraph(gd,gm,'../BGI');
setbkcolor(black);
setFillStyle(1,green);
bar(0,410,640,480);
for i:= 1 to 19 do begin
Line(stromek_x[i], stromek_y[i], stromek_x[i+1], stromek_y[i+1]);
end;
{konec_stromku}
{domek}
setcolor(white);
SetFillstyle(1,yellow);
bar(260,290,430,440);
{okna}
setFillStyle(1,blue);
bar(270,310,330,340);
bar(360,310,420,340);
bar(270,365,330,395);
{zaluzie}
setFillStyle(1,9);
bar(270,312,330,314); bar(270,318,330,320); bar(270,324,330,326);
bar(270,330,330,332); bar(270,336,330,338);
bar(360,312,420,314); bar(360,318,420,320); bar(360,324,420,326);
bar(360,330,420,332); bar(360,336,420,338);
bar(270,367,330,369); bar(270,373,330,375); bar(270,379,330,381);
bar(270,385,330,387); bar(270,391,330,393);
{konec zaluzii}
{konec_oken}
{dvere}
setcolor(black);
setFillStyle(1,brown);
bar(370,380,420,440);
setFillStyle(1,0);
Pieslice(395,390,0,360,1);
line(410,410,415,410);
setFillStyle(1,0);
bar(390,430,400,440);
{konec dveri}
{strecha}
setcolor(white);
setFillStyle(1,red);
FillPoly(SizeOf(Strecha) div SizeOf(Polypoint),Strecha);
setcolor(yellow);
line(260,290,430,290);
{konec strechy}
{konec_domku}
{bouda}
setFillStyle(1,brown);
bar(180,400,230,440);
setcolor(0);
line(180,440,230,440); line(180,400,180,440); line(230,400,230,440);
{strecha boudy}
setcolor(white);
setFillStyle(1,brown);
FillPoly(SizeOf(Strecha_bouda) div SizeOf(Polypoint),Strecha_bouda);
setcolor(black);
line(180,400,230,400);
{konec strechy boudy}
setFillStyle(1,black);
bar(195,420,215,440);
line(185,405,225,405); line(185,415,225,415); line(185,405,185,415);
line(225,405,225,415);
{bouda}
readln; {program ceka na stisk enteru}
closegraph;
end.