o
    JAf  ã                   @   s<   d Z ddlT dd„ Zdd„ Zedkreeƒ ƒ eƒ  dS dS )	aF        turtle-example-suite:

         tdemo_round_dance.py

(Needs version 1.1 of the turtle module that
comes with Python 3.1)

Dancing turtles have a compound shape
consisting of a series of triangles of
decreasing size.

Turtles march along a circle while rotating
pairwise in opposite direction, with one
exception. Does that breaking of symmetry
enhance the attractiveness of the example?

Press any key to stop the animation.

Technically: demonstrates use of compound
shapes, transformation of shapes as well as
cloning turtles. The animation is
controlled through update().
é    )Ú*c                   C   s   da d S )NF)Úrunning© r   r   ú-/usr/lib/python3.10/turtledemo/round_dance.pyÚstop   s   r   c                  C   s€  t ƒ  tdƒ tdƒ tdƒ d} d}d}d}tdƒ}td	ƒD ]"}t|ƒ tƒ }|| 9 }|| 9 }t| ƒ | 	||d
d| fd¡ qt
d|ƒ tdƒ tdƒ tƒ  tddƒ g }tdƒD ]}tdƒ tdƒ tdƒ tƒ  |d dkrz| tƒ ¡ q]tƒ  dattƒ tƒ  d}tr¾d}	|D ]}
|
 d¡ |
 d¡ |
 |	¡ |	dkr¦dnd}	q|dk r¹tdƒ t|ƒ |d9 }tƒ  ts‹dS )NZgray10FZtriangleg}—R—Œcé?g˜Šy!"@é   é   Zcompoundé
   g      Ð?ZblackZmultitrir   i8ÿÿÿé´   é   éüÿÿÿé   é   Té   g®Gázð?zDONE!)ZclearscreenZbgcolorZtracerÚshapeZShapeÚrangeZ	shapesizeZget_shapepolyZtiltZaddcomponentZregister_shapeZpuZsetposÚfdÚltÚupdateÚappendZcloneÚhomer   Z
onkeypressr   ÚlistenÚright)ÚfZphiÚsÚcÚshÚiÚpZdancersÚcsÚtaZdancerr   r   r   Úmain   sb   


€


õr!   Ú__main__N)Ú__doc__Zturtler   r!   Ú__name__ÚprintZmainloopr   r   r   r   Ú<module>   s    5

þ