copyWith method
Implementation
Animal copyWith({int? hp,bool resetHp=_F,int? deltaHp,}){if (_H is Dog){return (_H as Dog).copyWith(hp: hp,resetHp:resetHp,deltaHp:deltaHp,);}return Animal(hp: deltaHp!=null?(hp??_H.hp)+deltaHp:resetHp?10:(hp??_H.hp),);}