43 lines
1.6 KiB
C++
43 lines
1.6 KiB
C++
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* main.cpp :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2024/11/20 14:25:07 by adjoly #+# #+# */
|
|
/* Updated: 2024/11/27 12:28:17 by adjoly ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "ClapTrap.hpp"
|
|
#include <iostream>
|
|
#include <sstream>
|
|
|
|
void log(std::string emoji, std::string who, std::string str) {
|
|
std::cout << "「" << emoji << "」ClapTrap(" << who << "): " << str << std::endl;
|
|
}
|
|
|
|
void log(std::string emoji, std::string str) {
|
|
std::cout << "「" << emoji << "」ClapTrap: " << str << std::endl;
|
|
}
|
|
|
|
std::string iToS(unsigned int i) {
|
|
std::stringstream ss;
|
|
|
|
ss << i;
|
|
return (ss.str());
|
|
}
|
|
|
|
int main(void) {
|
|
ClapTrap kanel("Kanel");
|
|
ClapTrap suki("Suki");
|
|
|
|
kanel.setAttackDamage(5);
|
|
log("🙀", kanel.getName(), "Oh my god Kanel uses his last teeth to attack " + suki.getName());
|
|
kanel.attack(suki.getName());
|
|
suki.takeDamage(kanel.getAttackDamage());
|
|
|
|
return (0);
|
|
}
|