package com.javarush.task.task05.task0502;

/*
Реализовать метод fight
*/

public class Cat {
    public int age;
    public int weight;
    public int strength;

    public Cat(int age, int weight, int strength) {
    }

    public boolean fight(Cat anotherCat) {
        int countThis = 0, countAnother = 0;
        if (this.age > anotherCat.age) {
            countThis = countThis + 1;
        }
        if (anotherCat.age == this.age) {
            countAnother = countAnother + 1;
            countThis = countThis + 1;
        }
        if (this.age < anotherCat.age) {
            countAnother = countAnother + 1;
        }
        if (this.weight > anotherCat.weight ) {
            countThis = countThis + 1;
        }
        if (anotherCat.weight == this.weight) {
            countAnother = countAnother + 1;
            countThis = countThis + 1;
        }
        if (this.weight < anotherCat.weight ) {
            countAnother = countAnother + 1;
        }
        if (this.strength > anotherCat.strength) {
            countThis = countThis + 1;
        }
        if (anotherCat.strength == this.strength) {
            countAnother = countAnother + 1;
            countThis = countThis + 1;
        }
        if (this.strength < anotherCat.strength) {
            countAnother=countAnother+1;
        }
        return (countThis > countAnother);

    }

    public static void main(String[] args) {
            Cat cat1=new Cat(10,8,67);
            Cat cat2=new Cat(9,6,66);
        System.out.println(cat1.fight(cat2));
        System.out.println(cat2.fight(cat1));
    }
}