Ребят подскажите что тут не так. Я вообще уже не понимаю ничего. Что вообще происходит. Я как только не тестировал, все время правильно. А тут не проходит. Ничью не пускает. Но ведь если сумма моих побед больше суммы побед врага тогда true, во всех других случаях false включая ничью.
package com.javarush.task.task05.task0502;
/*
Реализовать метод fight
*/
public class Cat {
public int age;
public int weight;
public int strength;
public Cat() {
}
public boolean fight(Cat anotherCat) {
int winMe = 0;
int winAnother = 0;
if (this.age > anotherCat.age) {
winMe++;
}
else if (this.age < anotherCat.age ){
winAnother++;
}
if (this.strength > anotherCat.strength) {
winMe++;
}
else if (this.strength < anotherCat.strength ){
winAnother++;
}
if (this.weight > anotherCat.weight) {
winMe++;
}
else if (this.strength < anotherCat.strength ){
winAnother++;
}
if (winMe > winAnother) {
return true;
}
else{
return false;
}
}
public static void main(String[] args) {
}
}