python (3.11.7)

(root)/
lib/
python3.11/
turtledemo/
__pycache__/
minimal_hanoi.cpython-311.opt-1.pyc

edZddlTGddeZGddeZdZdZd	Ze	d
kr!eZ
ee
edSdS)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
 ---------------------------------------
)*ceZdZdZdS)Discct|dd||d|dzd||dzdd|dzz
|dS)	NsquareF)shapevisibleg?g@r)Turtle__init__pu	shapesize	fillcolorst)selfns  L/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/turtledemo/minimal_hanoi.pyr
z
Disc.__init__stHe<<<			sAcE1%%%qtQ!B$'''					N)__name__
__module____qualname__r
rrrrs#rrc$eZdZdZdZdZdZdS)Towerz-Hanoi tower, a subclass of built-in type listc||_dS)z-create an empty tower. x is x-position of pegN)x)rrs  rr
zTower.__init__ s
rc||j|ddt|zz||dS)Nij")setxrsetylenappendrds  rpushz
Tower.push#sG	tv	tBs4yyL !!!Arcdt|}|d|S)N)listpopr!r$s  rr*z	Tower.pop's%HHTNN	srN)rrr__doc__r
r&r*rrrrrsG33rrc|dkrSt|dz
|||||t|dz
|||dSdS)Nrr)hanoir&r*)rfrom_with_to_s    rr-r-,sb1uu
ac5#u%%%
ac5%%%%%%
urctddt	tdttt
t
ddddS#t$rYdSwxYw)Nspacezpress STOP button to exitcenterCourierboldalignfont)onkeyclearr-t1t2t3write
TerminatorrrrplayrC2s	$w	GGG

aR
)#:	<	<	<	<	<	<



s3A
A#"A#ctttddtdatdatdatdddD])}tt|*tddd	
ttdtdS)
Nriir3zpress spacebar to start gamer4r5r9r2	EVENTLOOP)htpenupgotorr>r?r@ranger&rrAr<rClisten)is rmainrN<sDDD%'''44===	tB	qB	sB
1Qr]]
Q	
(68888	$
HHH;r__main__N)
r+turtlerrr)rr-rCrNrmsgprintmainlooprrr<module>rTs$6D&&&


 Z
$&&C	E#JJJHJJJJJr