B
    v9aQ  ã               @   sT   d dl mZmZmZ d dlmZmZ dd„ Zdd„ Z	e
dkrPe	ƒ Zeeƒ eƒ  dS )	é    )ÚScreenÚTurtleÚmainloop)Úperf_counterÚsleepc             C   s¤   | g}x6t d|ƒD ](}|  ¡ }| d| ¡ | |¡ |} qW x`t |ƒD ]T}t|d | ƒ|d  }x6|D ].}| d| ¡ | d| d|¡ | |¡ qjW qHW d S )Né   g     €v@g       @gffffffæ?r   )ÚrangeZcloneZrtÚappendÚabsÚpencolorÚfd)ÚpÚneZszZ
turtlelistÚiÚqÚcÚt© r   ú/usr/lib/python3.7/rosette.pyÚmn_eck   s    

r   c              C   sÂ   t ƒ } |  d¡ tƒ }| d¡ | ¡  | d¡ | d¡ |  dd¡ tƒ }t	|ddƒ tƒ }|| }t
dƒ tƒ }x4tdd	„ |  ¡ D ƒƒrªx|  ¡ D ]}| ¡  q˜W qxW tƒ }d
|| |  S )NZblackr   Zredé   é$   é   r   c             s   s   | ]}|  ¡ V  qd S )N)Zundobufferentries)Ú.0r   r   r   r   ú	<genexpr>7   s    zmain.<locals>.<genexpr>zruntime: %.3f sec)r   Zbgcolorr   ZspeedZ
hideturtler   ZpensizeZtracerÚclockr   r   ÚanyZturtlesZundo)Úsr   ZatÚetZz1r   r   r   r   Úmain$   s&    



r   Ú__main__N)Zturtler   r   r   Ztimer   r   r   r   r   Ú__name__ÚmsgÚprintr   r   r   r   Ú<module>   s   