Update LabelStar

This commit is contained in:
Sebastien Moll 2026-05-12 15:59:25 +02:00
parent 91e95f7260
commit dee66c6242

View file

@ -20,9 +20,14 @@ public class LabelStar extends Label {
return volOiseau; return volOiseau;
} }
@Override
public double getCost() {
return super.getCost() + this.volOiseau;
}
public int compareTo(LabelStar o) { public int compareTo(LabelStar o) {
double coutthis = this.volOiseau + this.getCost(); double coutthis = this.getCost();
double coutautre = o.getVolOiseau() + o.getCost(); double coutautre = o.getCost();
if (coutthis == coutautre) { if (coutthis == coutautre) {
return Double.compare(this.volOiseau, o.getVolOiseau()); return Double.compare(this.volOiseau, o.getVolOiseau());
} }