static void testCommuns(FragTrap &ft, ScavTrap &st, NinjaTrap &nt, SuperTrap &sut) { std::cout << std::endl << "STD TESTS" << std::endl; FragTrap copy(ft); FragTrap test = copy; ft.takeDmg(35); ft.takeDmg(35); ft.takeDmg(100); ft.beRepaired(80); ft.beRepaired(80); ft.rangeAttack("farfaraway"); ft.meleeAttack("closeTaget"); ScavTrap ccopy(st); ScavTrap ttest = ccopy; st.takeDmg(35); st.takeDmg(35); st.takeDmg(100); st.beRepaired(80); st.beRepaired(80); st.rangeAttack("farfaraway"); st.meleeAttack("closeTaget"); NinjaTrap cccopy(nt); NinjaTrap tttest = cccopy; nt.takeDmg(35); nt.takeDmg(35); nt.takeDmg(100); nt.beRepaired(80); nt.beRepaired(80); nt.rangeAttack("farfaraway"); nt.meleeAttack("closeTaget"); SuperTrap ccccopy(sut); SuperTrap ttttest = ccccopy; sut.takeDmg(35); sut.takeDmg(35); sut.takeDmg(100); sut.beRepaired(80); sut.beRepaired(80); sut.rangeAttack("farfaraway"); sut.meleeAttack("closeTaget"); }
int main(void) { SuperTrap A; std::cout << std::endl; FragTrap B("The Original Claptrap"); std::cout << std::endl; ScavTrap D("Chat"); std::cout << std::endl; SuperTrap F("SuperNinja"); std::cout << std::endl; std::cout << std::endl; std::cout << "++++++++++++++++++++++++ ATTACK TIME ++++++++++++++++++++++" << std::endl; std::cout << std::endl; std::cout << std::endl; srand (time(NULL)); A.ninjaShoebox(D); std::cout << std::endl; A.ninjaShoebox(B); std::cout << std::endl; A.ninjaShoebox(F); std::cout << std::endl; A.vaulthunter_dot_exe(F.getName()); std::cout << std::endl; A.vaulthunter_dot_exe(D.getName()); std::cout << std::endl; A.meleeAttack("Claptrap clone"); A.rangedAttack("Claptrap clone"); A.takeDamage(100); std::cout << std::endl; A = F; std::cout << std::endl; A.beRepaired(200); std::cout << std::endl; std::cout << std::endl; std::cout << "++++++++++++++++++++++++ DESTRUCTOR TIME ++++++++++++++++++++++" << std::endl; std::cout << std::endl; std::cout << std::endl; return 0; }