54 lines
1.2 KiB
C++
54 lines
1.2 KiB
C++
#include <cstdlib>
|
|
#include "class/ScavTrap.hpp"
|
|
|
|
int main(void)
|
|
{
|
|
ClapTrap robot1("robot1");
|
|
ScavTrap robot2("robot2");
|
|
ScavTrap robot3("robot3");
|
|
ClapTrap robot4("robot4");
|
|
|
|
std::cout << "\nassignement 1:\n";
|
|
ScavTrap robotmp1("robot5");
|
|
robotmp1.guardGate();
|
|
std::cout << "copy:\n";
|
|
ClapTrap robot6(robotmp1); // PBM : it says it's a ScavTrap but it has no guardGate()...
|
|
// robot6.guardGate();
|
|
std::cout << "END assignement 1:\n\n";
|
|
|
|
//std::cout << "assignement 2:\n";
|
|
// ScavTrap robotmp2("robot7");
|
|
// ScavTrap robot8(robotmp2);
|
|
// robot8.guardGate();
|
|
//
|
|
//std::cout << "assignement 3:\n";
|
|
// ClapTrap robotmp3("robot9"); // PBM : assignation doesn't work...
|
|
//// ScavTrap robot10(robotmp3);
|
|
//// robot10.guardGate();
|
|
//
|
|
//std::cout << "assignement 4:\n";
|
|
// ClapTrap robotmp4("robot11");
|
|
// ClapTrap robot12(robotmp4);
|
|
//// robot12.guardGate();
|
|
|
|
|
|
|
|
ClapTrap ct(std::string("T800"));
|
|
ScavTrap st(std::string("T1000"));
|
|
|
|
std::cout << ct << std::endl;
|
|
std::cout << st << std::endl;
|
|
|
|
st = ScavTrap(std::string("TX"));
|
|
|
|
std::cout << st << std::endl;
|
|
|
|
st.attack(std::string("Sarah CONNOR"));
|
|
|
|
st.guardGate();
|
|
st.guardGate();
|
|
st.guardGate();
|
|
|
|
return EXIT_SUCCESS;
|
|
}
|