diff options
| author | manuel <manuel@mausz.at> | 2011-04-20 02:19:08 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2011-04-20 02:19:08 +0200 |
| commit | bbd2a69a962d15f74a4afcb7b66462eac9fa5008 (patch) | |
| tree | 17527ce744a9f1c4beb85e953a60f832cdd09068 /pacman-c++/server.h | |
| parent | 58ba349f19f98fe3af5332188f5d3dfe4d076807 (diff) | |
| download | foop-bbd2a69a962d15f74a4afcb7b66462eac9fa5008.tar.gz foop-bbd2a69a962d15f74a4afcb7b66462eac9fa5008.tar.bz2 foop-bbd2a69a962d15f74a4afcb7b66462eac9fa5008.zip | |
game rounds finally implemented:
- game rounds will be detected during the round AND
- a new map will be send in the NEXT tick to the clients
Diffstat (limited to 'pacman-c++/server.h')
| -rw-r--r-- | pacman-c++/server.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/pacman-c++/server.h b/pacman-c++/server.h index 6dd138b..a5afbfe 100644 --- a/pacman-c++/server.h +++ b/pacman-c++/server.h | |||
| @@ -41,7 +41,7 @@ protected: | |||
| 41 | 41 | ||
| 42 | protected slots: | 42 | protected slots: |
| 43 | /* called when a round is finished */ | 43 | /* called when a round is finished */ |
| 44 | void onRoundFinished(); | 44 | void setRoundFinished(bool value = true); |
| 45 | 45 | ||
| 46 | protected: | 46 | protected: |
| 47 | QMap<Color::Color, QTcpSocket *> m_clientConnections; | 47 | QMap<Color::Color, QTcpSocket *> m_clientConnections; |
| @@ -61,10 +61,12 @@ protected: | |||
| 61 | QHostAddress m_bindaddress; | 61 | QHostAddress m_bindaddress; |
| 62 | unsigned int m_port; | 62 | unsigned int m_port; |
| 63 | unsigned int m_maxplayers; | 63 | unsigned int m_maxplayers; |
| 64 | unsigned int m_rounds; // number of rounds (>= 1) | ||
| 65 | unsigned int m_numbots; | 64 | unsigned int m_numbots; |
| 66 | 65 | /* number of rounds (>= 1) */ | |
| 67 | unsigned int m_curRound; // current round starting with 0 | 66 | unsigned int m_rounds; |
| 67 | /* current round, starting at 0 */ | ||
| 68 | unsigned int m_curRound; | ||
| 69 | bool m_roundFinished; | ||
| 68 | 70 | ||
| 69 | QTimer *m_tickTimer; | 71 | QTimer *m_tickTimer; |
| 70 | 72 | ||
