Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 88
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 215
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 216
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 217
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 218
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 219
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 220
U
e5d @ sd d Z ddlT G dd deZG dd deZdd Zd d
Zdd Ze d
kr`e Z
ee
e dS )a turtle-example-suite:
tdemo_minimal_hanoi.py
A minimal 'Towers of Hanoi' animation:
A tower of 6 discs is transferred from the
left to the right peg.
An imho quite elegant and concise
implementation using a tower class, which
is derived from the built-in type list.
Discs are turtles with shape "square", but
stretched to rectangles by shapesize()
---------------------------------------
To exit press STOP button
---------------------------------------
)*c @ s e Zd Zdd ZdS )Discc C sP t j| ddd | | d|d d | |d dd|d | d S ) NZsquareF)shapeZvisibleg ? g @r )Turtle__init__ZpuZ shapesizeZ fillcolorst)selfn r 0/usr/lib64/python3.8/turtledemo/minimal_hanoi.pyr s
z
Disc.__init__N)__name__
__module____qualname__r r r r r
r s r c @ s( e Zd ZdZdd Zdd Zdd ZdS ) Towerz-Hanoi tower, a subclass of built-in type listc C s
|| _ dS )z-create an empty tower. x is x-position of pegN)x)r
r r r r
r s zTower.__init__c C s0 | | j |ddt| | | d S )Nij" )Zsetxr setylenappendr
dr r r
push# s z
Tower.pushc C s t | }|d |S )N )listpopr r r r r
r ' s
z Tower.popN)r r r __doc__r r r r r r r
r s r c C s> | dkr:t | d ||| || t | d ||| d S )Nr r )hanoir r )r Zfrom_Zwith_Zto_r r r
r , s r c C sJ t d d t z tdttt tdddd W n tk
rD Y nX d S )Nspace zpress STOP button to exitcenterZCourier ZboldZalignZfont)onkeyclearr t1t2t3writeZ
Terminatorr r r r
play2 s
r+ c C sp t t tdd tdatdatdatdddD ]} tt | q:t
ddd d
ttd t
dS )
Nr ii r zpress spacebar to start gamer! r" r$ r Z EVENTLOOP)ZhtZpenupZgotor r' r( r) ranger r r* r% r+ Zlisten)ir r r
main<