Exemplo n.º 1
0
 public override bool Equals(System.Object otherBattle)
 {
     if (!(otherBattle is Battle))
     {
         return(false);
     }
     else
     {
         Battle newBattle              = (Battle)otherBattle;
         bool   idEquality             = this.GetBattleId().Equals(newBattle.GetBattleId());
         bool   mon_idEquality         = this.GetMon_Id().Equals(newBattle.GetMon_Id());
         bool   nameEquality           = this.GetBattleName().Equals(newBattle.GetBattleName());
         bool   levelEquality          = this.GetLevel().Equals(newBattle.GetLevel());
         bool   totalHitpointsEquality = this.GetTotalHitpoints().Equals(newBattle.GetTotalHitpoints());
         bool   lastHitpointsEquality  = this.GetLastHitpoints().Equals(newBattle.GetLastHitpoints());
         bool   hitpointsEquality      = this.GetHitpoints().Equals(newBattle.GetHitpoints());
         bool   attackEquality         = this.GetAttack().Equals(newBattle.GetAttack());
         bool   defenseEquality        = this.GetDefense().Equals(newBattle.GetDefense());
         bool   spattackEquality       = this.GetSpecialattack().Equals(newBattle.GetSpecialattack());
         bool   spdefenseEquality      = this.GetSpecialdefense().Equals(newBattle.GetSpecialdefense());
         bool   speedEquality          = this.GetSpeed().Equals(newBattle.GetSpeed());
         bool   pp1Equality            = this.GetMove1pp().Equals(newBattle.GetMove1pp());
         bool   pp2Equality            = this.GetMove2pp().Equals(newBattle.GetMove2pp());
         bool   pp3Equality            = this.GetMove3pp().Equals(newBattle.GetMove3pp());
         bool   pp4Equality            = this.GetMove4pp().Equals(newBattle.GetMove4pp());
         bool   playerEquality         = this.GetIsPlayer().Equals(newBattle.GetIsPlayer());
         bool   computerEquality       = this.GetIsComputer().Equals(newBattle.GetIsComputer());
         bool   activeEquality         = this.GetIsActive().Equals(newBattle.GetIsActive());
         return(idEquality && mon_idEquality && nameEquality && levelEquality && totalHitpointsEquality && hitpointsEquality && attackEquality && defenseEquality && spattackEquality && spdefenseEquality && speedEquality && pp1Equality && pp2Equality && pp3Equality && pp4Equality && playerEquality && computerEquality && activeEquality);
     }
 }