|
|
|
|
@ -22,8 +22,8 @@ class Equipe {
|
|
|
|
|
|
|
|
|
|
void update() {
|
|
|
|
|
// affichage de l'emplacement d'équipe, qui restera toujours fixe
|
|
|
|
|
color bgColor = color(235, 112, 71, 0.8);
|
|
|
|
|
color textColor = color(240, 240, 80);
|
|
|
|
|
color bgColor = color(255, 255, 255, 120);
|
|
|
|
|
color textColor = color(0,0,0);
|
|
|
|
|
fill(bgColor);
|
|
|
|
|
stroke(bgColor);
|
|
|
|
|
strokeWeight(0.5);
|
|
|
|
|
@ -35,6 +35,16 @@ class Equipe {
|
|
|
|
|
float pos_x = this.id<9? this.posX-radius/5: this.posX-radius/3;
|
|
|
|
|
text(this.id+1, pos_x, this.posY+radius/5);
|
|
|
|
|
|
|
|
|
|
// affichage des tours
|
|
|
|
|
if (this.tour>0) {
|
|
|
|
|
color tourColor = color(255, 255, 255, 200);
|
|
|
|
|
fill(tourColor);
|
|
|
|
|
textSize(textSize);
|
|
|
|
|
float pos_y = this.posY+radius/5+30;
|
|
|
|
|
if (this.tour>=10) pos_x = pos_x - 6;
|
|
|
|
|
text(this.tour, pos_x, pos_y);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// mise à jour du pion
|
|
|
|
|
this.pion.draw();
|
|
|
|
|
}
|
|
|
|
|
@ -42,8 +52,8 @@ class Equipe {
|
|
|
|
|
void setScore(int score) {
|
|
|
|
|
if (this.score==score) return;
|
|
|
|
|
int oldScore = this.score;
|
|
|
|
|
this.incTour();
|
|
|
|
|
println("Equipe", this.id+1, "setScore from", oldScore, "to", score, "turn updated to", this.tour);
|
|
|
|
|
//this.incTour();
|
|
|
|
|
println("Equipe", this.id+1, "setScore from", oldScore, "to", score);
|
|
|
|
|
this.score = score;
|
|
|
|
|
this.update();
|
|
|
|
|
Scoreboard.applyScore(this.id, this.score, this.tour);
|
|
|
|
|
|