CPP03 1.0
読み取り中…
検索中…
一致する文字列を見つけられません
ScavTrap.hpp
[詳解]
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* ScavTrap.hpp :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: kamitsui <kamitsui@student.42tokyo.jp> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2025/05/09 11:10:56 by kamitsui #+# #+# */
9/* Updated: 2025/05/15 12:08:17 by kamitsui ### ########.fr */
10/* */
11/* ************************************************************************** */
12
22#ifndef SCAVTRAP_HPP
23#define SCAVTRAP_HPP
24
25#include "ClapTrap.hpp"
26#include <iostream>
27#include <string>
28
38class ScavTrap : virtual public ClapTrap {
39 public:
40 static const unsigned int defaultHitPoints = 100;
41 static const unsigned int defaultEnergyPoints = 50;
42 static const unsigned int defaultAttackDamage = 20;
43
45 ScavTrap(const std::string &name);
46 ScavTrap(const ScavTrap &other);
47 ScavTrap &operator=(const ScavTrap &other);
48 virtual ~ScavTrap();
49
50 virtual void attack(const std::string &target);
51 void guardGate();
52};
53
54#endif
Represents a basic robot character.
Definition ClapTrap.hpp:34
Represents a ScavTrap robot, a specialized type derived from ClapTrap.
Definition ScavTrap.hpp:38
static const unsigned int defaultEnergyPoints
Definition ScavTrap.hpp:41
ScavTrap(const std::string &name)
virtual ~ScavTrap()
ScavTrap & operator=(const ScavTrap &other)
ScavTrap(const ScavTrap &other)
void guardGate()
virtual void attack(const std::string &target)
Attack function implementation.
static const unsigned int defaultAttackDamage
Definition ScavTrap.hpp:42
static const unsigned int defaultHitPoints
Definition ScavTrap.hpp:40
Header file for the ClapTrap class.