diff options
| author | manuel <manuel@mausz.at> | 2011-04-18 19:47:34 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2011-04-18 19:47:34 +0200 |
| commit | 85b09864f6d489e8c998e9f172d25079d572c602 (patch) | |
| tree | a6e38da5dc828810b21045d0ac1e4babcf198825 /pacman-c++/sceneholder.h | |
| parent | e373442901064d07791c9739daa380acb1dfbb8c (diff) | |
| download | foop-85b09864f6d489e8c998e9f172d25079d572c602.tar.gz foop-85b09864f6d489e8c998e9f172d25079d572c602.tar.bz2 foop-85b09864f6d489e8c998e9f172d25079d572c602.zip | |
- add actor.canEat(other) to check if actor can eat other (note: that doesn't mean that other can eat actor!!)
- server now generated and sends the colorlist to the server in the first map update packet
- add a better AI
Diffstat (limited to 'pacman-c++/sceneholder.h')
| -rw-r--r-- | pacman-c++/sceneholder.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pacman-c++/sceneholder.h b/pacman-c++/sceneholder.h index 418f16b..69ee598 100644 --- a/pacman-c++/sceneholder.h +++ b/pacman-c++/sceneholder.h | |||
| @@ -21,6 +21,8 @@ public: | |||
| 21 | void updateMap(const Transmission::map_t& map, const unsigned int x, const unsigned int y); | 21 | void updateMap(const Transmission::map_t& map, const unsigned int x, const unsigned int y); |
| 22 | void setColor(Color::Color color = Color::none); | 22 | void setColor(Color::Color color = Color::none); |
| 23 | Color::Color color(); | 23 | Color::Color color(); |
| 24 | void setEatingOrder(QList<Color::Color> &order); | ||
| 25 | QList<Color::Color> &eatingOrder(); | ||
| 24 | 26 | ||
| 25 | private slots: | 27 | private slots: |
| 26 | void decrementPoints(); | 28 | void decrementPoints(); |
| @@ -46,6 +48,13 @@ protected: | |||
| 46 | /* my local color */ | 48 | /* my local color */ |
| 47 | Color::Color m_color; | 49 | Color::Color m_color; |
| 48 | 50 | ||
| 51 | /* a actor can only eat his upper neighbour | ||
| 52 | * the order of the neighbours is determined by the colors order (sent from server) | ||
| 53 | * please note that !pl1.canEat(pl2, ...) doesn't necessarily mean that pl2 can eat pl1 | ||
| 54 | * order MUST be in this format: [col1, [col2, ..., colN], col1] | ||
| 55 | */ | ||
| 56 | QList<Color::Color> m_eatingorder; | ||
| 57 | |||
| 49 | /* points left before round ends */ | 58 | /* points left before round ends */ |
| 50 | unsigned int m_pointsLeft; | 59 | unsigned int m_pointsLeft; |
| 51 | }; | 60 | }; |
