class Equipe { int id, score, radius; float pos_x, pos_y; String membres; color couleur; Pion pion; Equipe(int id) { this.id = id; this.score = 0; // générer un pion pour l'équipe this.pion = new Pion(this.id); // récupérer les valeurs de positionnement initial du pion this.pos_x = this.pion.posX; this.pos_y = this.pion.posY; this.radius = this.pion.radius; // afficher l'emplacement de l'équipe avant le pion this.update(); } void update() { // affichage de l'emplacement d'équipe, qui restera toujours fixe color bgColor = color(235, 112, 71, 0.8); color textColor = color(200); fill(bgColor); stroke(bgColor); strokeWeight(0.5); circle(this.pos_x,this.pos_y,radius); fill(textColor); float textSize = this.radius/4*3; textSize(textSize); float pos_x = this.id<9? this.pos_x-radius/5: this.pos_x-radius/3; text(this.id+1, pos_x, this.pos_y+radius/5); // mise à jour du pion this.pion.draw(); } void setScore(int score) { this.score = score; //println("Equipe", this.id+1, "setScore", score); } }