diff options
Diffstat (limited to 'kue/team.h')
-rw-r--r-- | kue/team.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/kue/team.h b/kue/team.h new file mode 100644 index 00000000..f2b39816 --- /dev/null +++ b/kue/team.h @@ -0,0 +1,26 @@ +#ifndef _TEAM_H +#define _TEAM_H + +#include <tqptrlist.h> +#include "player.h" + +class KueTeam { + public: + KueTeam() {} + ~KueTeam() {} + + // Moves currentPlayer forward to the next player, and returns its new value + KuePlayer *nextPlayer() { if (!_players.next()) return _players.first(); else return _players.current();} + // Returns the current player + KuePlayer *currentPlayer() { return _players.current(); } + + // Adds a new player + void addPlayer(KuePlayer *p) { _players.append(p); } + // Removes an existing player + void removePlayer(KuePlayer *p) { _players.remove(p); } + + private: + TQPtrList<KuePlayer> _players; +}; + +#endif |