Помогите найти ошибку из-за которой валидатор не пропускает. Метод файт
package com.javarush.task.jdk13.task05.task0501;
/*
Кошачья бойня(1)
1. У класса Cat должна быть переменная name с типом String.
2. У класса Cat должна быть переменная age с типом int.
3. У класса Cat должна быть переменная weight с типом int.
4. У класса Cat должна быть переменная strength с типом int.
5. Всего в классе должно быть 4 переменных.
*/
public class Solution {
public static void main(String[] args) {
Cat cat1 = new Cat("Tom", 2, 2, 2);
Cat cat2 = new Cat("Sam", 2, 2, 2);
Cat cat3 = new Cat("Fiona", 3, 3, 3);
System.out.println(cat3.fight(cat1));
}
public static class Cat {
private String name;
private int age;
private int weight;
private int strength;
public Cat(String name, int age, int weight, int strength) {
this.name = name;
this.age = age;
this.weight = weight;
this.strength = strength;
}
public boolean fight(Cat anotherCat){
int win = 0;
win = this.age < anotherCat.age ? win + 1 : win - 1;
win = this.weight > anotherCat.weight ? win + 1 : win - 1;
win = this.strength > anotherCat.strength ? win + 1 : win -1;
return win > 0;
}
}
}