Witam, potrzebuje pomocy w pascalu. Mianowicie mam już narysowany domek ze słońcem i musicie zrobić żeby to słońce się ruszało i obok domku musi kwiat wyrosnąć ( można sobie darować ).
PROGRAM domek;
USES
Graph,crt;
VAR
sterownik,x,y,kolor,tryb:integer;
BEGIN
sterownik:=detect;
initgraph (sterownik,tryb,'');
setcolor(blue);
rectangle(0,0,0,1000);
rectangle(1000,0,1000,1000);
rectangle(0,1000,1000,1000);
rectangle(0,0,1000,0);
setfillstyle(1,blue);
FloodFill(500,500,blue);
setcolor(green);
setlinestyle(solidln,0,thickwidth);
line(0,400,0,800);
line(999,400,999,999);
line(0,999,999,999);
line(0,400,999,400);
setfillstyle(1,green);
FloodFill(300,400,green);
setcolor(red);
setlinestyle(solidln,0,thickwidth);
line(300,250,550,250);{podstawa gorna}
line(250,350,600,350);{podstawa dolna}
line(250,350,300,250);{bok lewy}
line(600,350,550,250);{bok prawy}
setfillstyle(1,red);
FloodFill(300,299,red);
setcolor(black);
setlinestyle(solidln,0,thickwidth);
line(450,200,500,200);
line(450,200,450,250);
line(500,200,500,250);
line(450,250,500,250);
setfillstyle(1,black);
FloodFill(475,225,black);
setcolor(LightGray);
rectangle(275,350,275,550);{lewy bok}
rectangle(575,350,575,550);{prawy bok}
rectangle(275,550,575,550);{podstawa sciany}
rectangle(275,350,575,350);{podstawa górna}
setfillstyle(1,LightGray);
FloodFill(450,450,LightGray);
setcolor(11);
setlinestyle(solidln,0,thickwidth);
line(300,400,350,400);
line(300,400,300,450);
line(350,400,350,450);
line(300,450,350,450);
line(500,400,550,400);
line(500,400,500,450);
line(550,400,550,450);
line(500,450,550,450);
setfillstyle(1,11);
FloodFill(325,425,11);
setfillstyle(1,11);
FloodFill(525,425,11);
setcolor(black);
setlinestyle(solidln,0,thickwidth);
line(390,440,460,440);
line(390,440,390,550);
line(460,440,460,550);
line(390,550,460,550);
Circle(400,490,5);
setfillstyle(1,black);
FloodFill(424,494,black);
Setcolor(yellow);
Circle(800,100,80);
setfillstyle(1,yellow);
FloodFill(800,100,yellow);
readln;
closegraph;
END.
" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.
Dopisz sobie pod koniec:
for i:=1 to 600 do begin
Setcolor(yellow);
Circle(i+30,round(300-sqrt(300*300-(i-300)*(i-300))),30);
delay(20);
Setcolor(black);
Circle(i+30,round(300-sqrt(300*300-(i-300)*(i-300))),30);
end;
proponuję również zamiast readln dać readkey