Update LabelStar
This commit is contained in:
parent
91e95f7260
commit
dee66c6242
1 changed files with 7 additions and 2 deletions
|
|
@ -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());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue