summaryrefslogtreecommitdiff
path: root/ex03/HumanA.cpp
blob: e7b64110b03fe9dea876ca9e58949df7e22cef29 (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
25
/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   HumanA.cpp                                         :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: dkaiser <dkaiser@student.42heilbronn.de    +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2025/02/10 12:00:00 by dkaiser           #+#    #+#             */
/*   Updated: 2025/02/10 12:59:46 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 ";
    std::cout << weapon->getType() << std::endl;
}