from turtle import *
from time import *
from Tkinter import *
# -----------------------------------------
nom = raw_input("entrer votre nom::")
# -----------------------------------------

sleep(1)
print "checking",
sleep(0.5)
print ".",
sleep(0.5)
print ".",
sleep(0.5)
print ".",
sleep(0.5)
print ".",
sleep(0.5)
print "."
sleep(0.5)
print """[déplacer le mini char grace au cmd]"""

# -----------------------------------------
for foo in range(0,5):
	print """[cheking]"""
# -----------------------------------------
def haut(vitesse):
	forward(vitesse)
	print"""[OK]"""
def g():
	left(45)
	print"""[OK]"""
def d():
	right(45)
	print"""[OK]"""
# -----------------------------------------
instruction = """déplacer le mini char grace au cmd suivantes:
5:       fait avancer (vitesse 1)
1:       fait tourner a gauche (angle :45°)
3:       fait tourner a droite (angle :45°)
8:       fait avancer (vitesse 2)
0:       fait reculer (vitesse 1)
2:       fait reculer (vitesse 2)
7:       leve le crayon
9:       baisse le crayon
deb:     raméne au debut
colname: donne le nom des couleurs
colors:  change la couleurs
r:       recommence tout
print:   écrit un mot
h:       redonne ces instructions
q:       quit"""
# -----------------------------------------
couleursname = """red = rouge
green = vert
yellow = jaune
blue = blue
pink = rose (claire)
darkred = rouge fonce
"""
# -----------------------------------------
print instruction
reset()
while 1:
	choix = raw_input("cmd>:")
	if choix == "5":
		haut(10)
	if choix == "1":
		g()
	if choix == "3":
		d()
	if choix == "8":
		haut(50)
	if choix == "q":
		break
	if choix == "h":
		print instruction
	if choix == "r":
		reset()
	if choix == "print":
		mot = raw_input("cmd>print>:")
		write(mot)
	if choix == "0":
		backward(10)
	if choix == "colors":
		couleurs = raw_input("cmd>colors>:")
		try:
			color(couleurs)
		except:
			print "tu t'est tromper de couleurs",nom
	if choix == "7":
		up()
	if choix == "9":
		down()
	if choix == "2":
		backward(50)

	if choix == "colname":
		print couleursname
	if choix == " ":
		write(""" [vous êtes en possession de 10000 €]""")
	if choix == "code":
		print """[]c'est nicolas qui a fait ce programme[]"""
	if choix == "norm":
		up()
		goto(0,0)
		color("black")
		down()
	if choix == "deb":
		goto(0,0)
	if choix == "list":
		choix2 = raw_input("cmd>list>:")
		for choix in choix2 :
			if choix == "5":
				haut(10)
			if choix == "1":
				g()
			if choix == "3":
				d()
			if choix == "8":
				haut(50)
			if choix == "0":
				backward(10)
			if choix == "7":
				up()
			if choix == "9":
				down()
			if choix == "2":
				backward(50)
	choix = ""
# -----------------------------------------
#fen1 = Tk()
#voici les boutons:
#class boutondepl:
#	b1 = Button(fen1, text="^^^^^",command = haut()).pack()
#	b2 = Button(fen1, text=">>>>>",command = d()).pack()
#	b3 = Button(fen1, text="<<<<<",command = g()).pack()
#boutondepl
#up()
#backward(100)
#down()fen1 = Tk()
#write('nicolas')
#right(90)
#forward(5)
#left(90)
#forward(40)
print "1"
#b4 = button(fen1, text="",comand = )
#b5 = button(fen1, text="",comand = )

#fen1.mainloop()
print "2"




