From b6fec20dadaf71fc28961a4a6d720d1d665508e8 Mon Sep 17 00:00:00 2001 From: totycro Date: Tue, 19 Apr 2011 19:48:26 +0200 Subject: Added number of rounds parameter (unused) --- pacman-c++/server.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pacman-c++/server.h') diff --git a/pacman-c++/server.h b/pacman-c++/server.h index 826c701..fd1b571 100644 --- a/pacman-c++/server.h +++ b/pacman-c++/server.h @@ -56,7 +56,11 @@ protected: QHostAddress m_bindaddress; unsigned int m_port; unsigned int m_maxplayers; + unsigned int m_rounds; // number of rounds (>= 1) unsigned int m_numbots; + + unsigned int m_curRound; // current round starting with 0 + }; #endif // SERVER_H -- cgit v1.2.3 From eaf133fd08c9708fe718ef47451bed7ea803a46a Mon Sep 17 00:00:00 2001 From: totycro Date: Tue, 19 Apr 2011 21:56:37 +0200 Subject: Added rounds rounds will end when all points are removed TODO: end round when a pacman gets eaten --- pacman-c++/server.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'pacman-c++/server.h') diff --git a/pacman-c++/server.h b/pacman-c++/server.h index fd1b571..dc8de88 100644 --- a/pacman-c++/server.h +++ b/pacman-c++/server.h @@ -38,6 +38,12 @@ protected: void colorizeBlocks(Transmission::map_t map); void botCalculate(Actor *actor); +protected slots: + // TODO: call this when a pacman get's eaten + void onRoundFinished(); // called when a round is finished +protected: + void initRoundMap(bool firstPacket = false); // creates new round map + protected: QMap m_clientConnections; QList m_bots; @@ -61,6 +67,8 @@ protected: unsigned int m_curRound; // current round starting with 0 + QTimer *m_tickTimer; + }; #endif // SERVER_H -- cgit v1.2.3