-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGame_lab_2.cpp
More file actions
37 lines (26 loc) · 906 Bytes
/
Copy pathGame_lab_2.cpp
File metadata and controls
37 lines (26 loc) · 906 Bytes
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
26
27
28
29
30
31
32
33
34
35
36
37
#include <string>
#include <iostream>
#include "Player.h"
#include "Enemy.h"
#include "Weapons.h"
#include "Quest.h"
#include "Entity.h"
using namespace std;
int main()
{
// Реализация взаимодействия классов друг с другом
quest FirstQuest = quest(1, "Begining", "You need to kill 2 big demons");
NPC Civilian = NPC("Friend", 32, "Friend, pls, help me!", FirstQuest);
warrior Knight = warrior(213223, "Knight", 100);
weapon legend_bow = weapon("bow", "Legengary bow", 30, 20);
weapon My_sword = weapon("sword", "Legengary sword", 45, 10);
Knight.Talk_NPC(Civilian);
Knight.Swap_weapon(My_sword);
Knight.Warrior_furios();
Knight.Player_get_info();
demon Goliath;
Goliath.Enemy_get_info();
Knight.Player_attack(Goliath);
Goliath.Enemy_get_info();
return 0;
}