def reprendre_partie (): """ Réaffiche le plateau et les coups joués précédement dans la partie sur l'écran Turtle @return : None @throw : PasEnCoursDePartie """ global historique if est_en_partie () != True: raise PasEnCoursDePartie affichage.plateau () # Remet l'affichage du plateau for coup in historique: couleurs_hexa = [] for couleurplacee in coup[0]: # alala, c'est trop con sinon couleurs_hexa.append (couleurs.couleur_to_hexa (couleurplacee)) affichage.afficher_couleurs (4,couleurs_hexa,coup[1])
def loose (code): """ Affiche l'écran de défaite @bg : str @return : None """ raz () # Ou pas ? th = persistance.get_propriete ("backgrounds", "theme:courant") y = int (persistance.get_propriete ("backgrounds", "theme:" + th + ":y:plateau")) x = int (persistance.get_propriete ("backgrounds", "theme:" + th + ":x:plateau")) path = "Images/Theme" + th + "/perdu.gif" bgpic(path) aller_a (-125, -70) # On centre la réponse color ("white") begin_fill () rectangle (250,110) end_fill () aller_a (-95, -65) # On centre la réponse for i in code: color (couleurs.couleur_to_hexa (i)) begin_fill () carre (40) end_fill () fd(50) aller_a (-110,0) color ("black") texte ("La solution était","important")