]> jfr.im git - irc/gameservirc.git/blob - gameserv-2.0/libgameservgldl/include/GameServ/GameLayer/FightGL.h
I implemented a mock forest driver and found a problem in using the singleton design...
[irc/gameservirc.git] / gameserv-2.0 / libgameservgldl / include / GameServ / GameLayer / FightGL.h
1 #ifndef __GS__FIGHTGL_H__
2 #define __GS__FIGHTGL_H__
3
4 #include <GameServ/GameLayer/GameObjects/PlayerGO.h>
5 #include <GameServ/GameLayer/GameObjects/MonsterGO.h>
6 using GameServ::GameLayer::GameObjects::PlayerGO;
7 using GameServ::GameLayer::GameObjects::MonsterGO;
8
9 #include <GameServ/DataLayer/IPlayerDAO.h>
10 using GameServ::DataLayer::DataAccessObjects::IPlayerDAO;
11
12
13 #include <boost/smart_ptr/shared_ptr.hpp>
14 using boost::shared_ptr;
15
16 #include <string>
17 using std::string;
18
19 namespace GameServ { namespace GameLayer {
20
21 class FightGL
22 {
23 public:
24 FightGL();
25 ~FightGL();
26
27 unsigned int PlayerAttackMonster(shared_ptr<PlayerGO> spPlayer, shared_ptr<MonsterGO> spMonster);
28 unsigned int MonsterAttackPlayer(shared_ptr<MonsterGO> spMonster, shared_ptr<PlayerGO> spPlayer);
29
30 unsigned int PlayerAttackPlayer(shared_ptr<PlayerGO> spPlayerAttacker, shared_ptr<PlayerGO> spPlayerDefender);
31
32
33 private:
34
35 unsigned int CalculateAttack(unsigned int strength, unsigned int defense);
36 void Initialize();
37 shared_ptr<IPlayerDAO> mspPlayerDAO;
38 };
39
40 }}
41
42 #endif