//graphiqme du jeu void graphisme() { //case lettres utilisées rect(700, 520, 200, 100, 9); //case titre + titre rect(100, 50, 400, 100, 9); textSize(32); fill(0, 0, 0); textSize(35); text("Le Jeu du Pendu", 170, 112); //case pendu fill(255); rect(650, 67, 300, 400, 9); } //clavier void clavier() { A = new GButton(this, 70, 510, 40, 40, "A"); B = new GButton(this, 380, 610, 40, 40, "B"); C = new GButton(this, 280, 610, 40, 40, "C"); D = new GButton(this, 190, 560, 40, 40, "D"); E = new GButton(this, 170, 510, 40, 40, "E"); F = new GButton(this, 240, 560, 40, 40, "F"); G = new GButton(this, 290, 560, 40, 40, "G"); H = new GButton(this, 340, 560, 40, 40, "H"); I = new GButton(this, 420, 510, 40, 40, "I"); J = new GButton(this, 390, 560, 40, 40, "J"); K = new GButton(this, 440, 560, 40, 40, "K"); L = new GButton(this, 490, 560, 40, 40, "L"); M = new GButton(this, 130, 610, 40, 40, "M"); N = new GButton(this, 430, 610, 40, 40, "N"); O = new GButton(this, 470, 510, 40, 40, "O"); P = new GButton(this, 520, 510, 40, 40, "P"); Q = new GButton(this, 90, 560, 40, 40, "Q"); R = new GButton(this, 220, 510, 40, 40, "R"); S = new GButton(this, 140, 560, 40, 40, "S"); T = new GButton(this, 270, 510, 40, 40, "T"); U = new GButton(this, 370, 510, 40, 40, "U"); V = new GButton(this, 330, 610, 40, 40, "V"); W = new GButton(this, 180, 610, 40, 40, "W"); X = new GButton(this, 230, 610, 40, 40, "X"); Y = new GButton(this, 320, 510, 40, 40, "Y"); Z = new GButton(this, 120, 510, 40, 40, "Z"); } //code pour que le mot à trouver soit caché par des pointillés void afficherMotCache(String mot) { int nb_lettres = mot.length(); String inconnu = ""; fill(0); for (int i=0; i