| 1 |  | 
|---|
| 2 |  | 
|---|
| 3 |  | 
|---|
| 4 |  | 
|---|
| 5 |  | 
|---|
| 6 | #ifndef Wagnis_Player_h | 
|---|
| 7 | #define Wagnis_Player_h | 
|---|
| 8 |  | 
|---|
| 9 | #include "WagnisPrereqs.h" | 
|---|
| 10 | #include "Wagnis.h" | 
|---|
| 11 | #include "OrxonoxPrereqs.h" | 
|---|
| 12 | #include "core/CoreIncludes.h" | 
|---|
| 13 | #include "core/XMLPort.h" | 
|---|
| 14 | #include "WagnisProvince.h" | 
|---|
| 15 | #include "WagnisGameboard.h" | 
|---|
| 16 | #include <vector> | 
|---|
| 17 | #include <string> | 
|---|
| 18 | #include "infos/HumanPlayer.h" | 
|---|
| 19 | #include <algorithm> | 
|---|
| 20 | #include <iostream> | 
|---|
| 21 |  | 
|---|
| 22 |  | 
|---|
| 23 |  | 
|---|
| 24 |  | 
|---|
| 25 |  | 
|---|
| 26 | namespace orxonox | 
|---|
| 27 | { | 
|---|
| 28 |     class WagnisPlayer : public HumanPlayer, public Tickable | 
|---|
| 29 |     { | 
|---|
| 30 |     public: | 
|---|
| 31 |         WagnisPlayer(Context*); | 
|---|
| 32 |         virtual ~WagnisPlayer(); | 
|---|
| 33 |         void tick(float); | 
|---|
| 34 |  | 
|---|
| 35 |         void playerTurn(); | 
|---|
| 36 |         bool checkMove(MoveType); | 
|---|
| 37 |         void setTroops(WagnisProvince*); | 
|---|
| 38 |         void attack(WagnisProvince*,WagnisProvince*); | 
|---|
| 39 |         void moveTroops(WagnisProvince*,WagnisProvince*); | 
|---|
| 40 |         std::string toString(); | 
|---|
| 41 |         void setActive(bool); | 
|---|
| 42 |         bool isActive() const; | 
|---|
| 43 |         void resetProvinceSelection(); | 
|---|
| 44 |  | 
|---|
| 45 |  | 
|---|
| 46 |  | 
|---|
| 47 |         Wagnis* master; | 
|---|
| 48 |         GameStage gameStage; | 
|---|
| 49 |         bool province_selection_changed; | 
|---|
| 50 |         int Player_ID; | 
|---|
| 51 |         WagnisGameboard* gameBoard; | 
|---|
| 52 |         WagnisProvince* origin_province; | 
|---|
| 53 |         WagnisProvince* target_province; | 
|---|
| 54 |         int reinforcements; | 
|---|
| 55 |         std::vector<int> AlreadyChecked; | 
|---|
| 56 |         bool isNeighbour(WagnisProvince*, WagnisProvince*); | 
|---|
| 57 |         bool existPath(WagnisProvince*, WagnisProvince*); | 
|---|
| 58 |         bool contains(std::vector<int>, int); | 
|---|
| 59 |         int dice(); | 
|---|
| 60 |         int best3(int, int, int); | 
|---|
| 61 |         int best2(int, int); | 
|---|
| 62 |         int second3(int, int, int); | 
|---|
| 63 |         int second2(int, int); | 
|---|
| 64 |  | 
|---|
| 65 |         private: | 
|---|
| 66 |         bool is_active; | 
|---|
| 67 |     }; | 
|---|
| 68 | } | 
|---|
| 69 |  | 
|---|
| 70 |  | 
|---|
| 71 | #endif | 
|---|