-
Notifications
You must be signed in to change notification settings - Fork 0
/
buff.h.orig
83 lines (63 loc) · 1.81 KB
/
buff.h.orig
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#ifndef _BUFF_H_
#define _BUFF_H_
#include <cstdlib>
#include <iostream>
#include <vector>
#include <memory>
#include "type.h"
#include "style.h"
<<<<<<< HEAD
#include <string>
#include "treasure.h"
=======
#include "merchant.h"
>>>>>>> 3bb364c3c061b7536da63e2b3502a7d7de9a45e1
class VisitExcept;
class Potion;
class VisitExcept;
class Merchant;
class Object;
class Player;
class Enemy;
class Item;
<<<<<<< HEAD
std::vector<std::pair<int, int>> findChar(std::vector<std::vector<char>> s, char c);
void colorLayer(std::vector<std::pair<int, int>> thechar, char c);
//void colorWindow(std::string s);
=======
class merchant;
>>>>>>> 3bb364c3c061b7536da63e2b3502a7d7de9a45e1
void clearScreen();
int getRandom(int min, int max);
std::string messageOut(std::string message);
int getDamage(int, int);
bool compare(std::shared_ptr<Object> ob1,std::shared_ptr<Object> ob2);
int distance(int r1, int c1, int r2, int c2);
std::string direction(Object &bevisit, Object &visit);
//void normal_enemy_move();
//template
template<typename Bevisit , typename Visit , typename Type>
bool be_visit_by(Bevisit & v1, Visit & v2, Type t){
if(t == ATTACK){
return be_attack(v1, v2);
}
if(t == PICKUP){
return be_pick_up(v1, v2);
}
if(t == MOVE){
return be_go_over(v1, v2);
}
return false;
}
bool be_attack(Player &player, Enemy &enemy);
bool be_attack(Enemy &enemy, Player &player);
bool be_attack(Item &item, Player &player);
bool be_pick_up(Treasure &treasure, Player &player);
bool be_pick_up(Potion &potion, Player &player);
bool be_pick_up(Enemy &enemy, Player &player);
bool be_pick_up(Player &player, Enemy &enemy);
bool be_go_over(Potion &potion, Player &player);
bool be_go_over(Enemy &enemy, Player &player);
bool be_go_over(Player &player, Enemy &enemy);
bool be_go_over(Treasure &treasure, Player &player);
#endif