summaryrefslogtreecommitdiff
path: root/ex03/HumanA.cpp
blob: 84dec6142561a8ba57790aefb922dea9a27dac6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   HumanA.cpp                                         :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: dkaiser <dkaiser@student.42heilbronn.de    +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2025/02/10 12:00:00 by dkaiser           #+#    #+#             */
/*   Updated: 2025/02/10 12:51:24 by dkaiser          ###   ########.fr       */
/*                                                                            */
/* ************************************************************************** */

#include "HumanA.hpp"
#include <iostream>

HumanA::HumanA(const std::string &name, Weapon &weapon)
    :weapon(&weapon),
     name(name)
{}

void HumanA::attack(void) const
{
    std::cout << name << "attacks with their " << weapon->getType() << std::endl;
}