server keeps list of arrows

This commit is contained in:
Max-Wilhelm Bruker 2009-10-20 16:45:29 +02:00
parent 4bc76600e8
commit 961b42f734
7 changed files with 120 additions and 12 deletions

View file

@ -24,6 +24,7 @@
#include <QString>
class Card;
class ServerSocket;
class AbstractRNG;
class PlayerZone {
@ -38,12 +39,13 @@ public:
// list index, whereas cards in any other zone are referenced by their ids.
enum ZoneType { PrivateZone, PublicZone, HiddenZone };
private:
ServerSocket *player;
QString name;
bool has_coords;
ZoneType type;
int cardsBeingLookedAt;
public:
PlayerZone(const QString &_name, bool _has_coords, ZoneType _type);
PlayerZone(ServerSocket *_player, const QString &_name, bool _has_coords, ZoneType _type);
~PlayerZone();
Card *getCard(int id, bool remove, int *position = NULL);
@ -53,6 +55,7 @@ public:
bool hasCoords() const { return has_coords; }
ZoneType getType() const { return type; }
QString getName() const { return name; }
ServerSocket *getPlayer() const { return player; }
QList<Card *> cards;
void insertCard(Card *card, int x, int y);