U e5d @s@ddlTddZddZddZedkr.rcSs tddSr)leftr r r r l:szmain..lcSs tddS)Ng@)forwardr r r r f=szmain..fzf+f+f--f--f+f+f)-+rrrzb+f+b--f--b+f+bz b--f--b--fr)sleepcSstdtdddS)NZred Z)colorcircler r r r AVszmain..AcSs>ddlm}tdd|d}t|t|dt|dS)Nr)sqrtZblacki)Zmathr"rrr )r"rr r r BZs    zmain..BcSstdtddS)NZgreenr)rrr r r r Fbszmain..F)arrZafbfaZ afbfbfbfa)r'rZfbfbfbfbrzDone!) r resetZspeedZtracerZhtZupZbackwardZdownr timerr)rrrZ snake_rulesZsnake_replacementRulesZ snake_startZdrawingrr!r%r&Z krishna_rulesZkrishna_replacementRulesZ krishna_startr r r main1s@         r*__main__N)Zturtler r r*__name__msgprintZmainloopr r r r s C