update compareTo

This commit is contained in:
Sem van der Hoeven
2020-06-02 23:43:35 +02:00
parent c9a6907fca
commit 1285e1ae82

View File

@@ -94,7 +94,7 @@ public abstract class GameCharacter extends Actor implements Comparable<GameChar
@Override
public int compareTo(GameCharacter o) {
return this.name.compareTo(o.name);
return this.name.compareTo(o.name) + this.health - o.health;
}
@Override