var x,n : integer; begin randomize; n := random (6)+1; Form1.Canvas.Pen.Color := clYellow; Form1.Canvas.Brush.Color := clYellow; x := 0; Form1.Canvas.Rectangle(x+10,10,x+130,130); Form1.Canvas.Pen.Color := clBlack; Form1.Canvas.Brush.Color := clBlack; case n of 1: Form1.Canvas.Ellipse(50+x,50,90+x,90); 2: begin Form1.Canvas.Ellipse(10+x,10,50+x,50); Form1.Canvas.Ellipse(90+x,90,130+x,130); end; 3: begin Form1.Canvas.Ellipse(50+x,50,90+x,90); Form1.Canvas.Ellipse(10+x,10,50+x,50); Form1.Canvas.Ellipse(90+x,90,130+x,130); end; 4: begin Form1.Canvas.Ellipse(10+x,10,50+x,50); Form1.Canvas.Ellipse(90+x,90,130+x,130); Form1.Canvas.Ellipse(10+x,90,50+x,130); Form1.Canvas.Ellipse(90+x,50,130+x,10); end; 5: begin Form1.Canvas.Ellipse(50+x,50,90+x,90); Form1.Canvas.Ellipse(10+x,10,50+x,50); Form1.Canvas.Ellipse(90+x,90,130+x,130); Form1.Canvas.Ellipse(10+x,90,50+x,130); Form1.Canvas.Ellipse(90+x,50,130+x,10); end; 6: begin Form1.Canvas.Ellipse(10+x,10,50+x,50); Form1.Canvas.Ellipse(90+x,90,130+x,130); Form1.Canvas.Ellipse(10+x,90,50+x,130); Form1.Canvas.Ellipse(90+x,50,130+x,10); Form1.Canvas.Ellipse(10+x,10,50+x,50); Form1.Canvas.Ellipse(90+x,90,130+x,130); end; end;
end; |