CPP01 1.0
読み取り中…
検索中…
一致する文字列を見つけられません
HumanB.hpp
[詳解]
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* HumanB.hpp :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: kamitsui <kamitsui@student.42tokyo.jp> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2025/04/15 19:43:29 by kamitsui #+# #+# */
9/* Updated: 2025/04/23 01:42:05 by kamitsui ### ########.fr */
10/* */
11/* ************************************************************************** */
12
18#ifndef HUMANB_HPP
19#define HUMANB_HPP
20
21#include "Weapon.hpp"
22#include <string>
23
27class HumanB {
28 private:
29 std::string name;
30 Weapon *weapon;
31
32 public:
36 HumanB(std::string name);
37
41 ~HumanB();
42
46 void setWeapon(Weapon &weapon);
47
51 void attack() const;
52};
53
54#endif
Declares the Weapon class.
Represents a HumanB, who may or may not have a weapon.
Definition HumanB.hpp:27
void setWeapon(Weapon &weapon)
Sets the weapon for the HumanB.
Definition HumanB.cpp:42
void attack() const
Makes the HumanB attack.
Definition HumanB.cpp:53
~HumanB()
Destructor for the HumanB class.
Definition HumanB.cpp:35
Represents a Weapon with a specific type.
Definition Weapon.hpp:26