mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-26 08:33:54 -07:00
reworked protocol; only server code for now
This commit is contained in:
parent
da6a1a0dbd
commit
a8c45fda1a
13 changed files with 669 additions and 534 deletions
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
class Card;
|
||||
class ServerSocket;
|
||||
class AbstractRNG;
|
||||
class Player;
|
||||
|
||||
class PlayerZone {
|
||||
public:
|
||||
|
|
@ -39,13 +39,13 @@ public:
|
|||
// list index, whereas cards in any other zone are referenced by their ids.
|
||||
enum ZoneType { PrivateZone, PublicZone, HiddenZone };
|
||||
private:
|
||||
ServerSocket *player;
|
||||
Player *player;
|
||||
QString name;
|
||||
bool has_coords;
|
||||
ZoneType type;
|
||||
int cardsBeingLookedAt;
|
||||
public:
|
||||
PlayerZone(ServerSocket *_player, const QString &_name, bool _has_coords, ZoneType _type);
|
||||
PlayerZone(Player *_player, const QString &_name, bool _has_coords, ZoneType _type);
|
||||
~PlayerZone();
|
||||
|
||||
Card *getCard(int id, bool remove, int *position = NULL);
|
||||
|
|
@ -55,11 +55,11 @@ public:
|
|||
bool hasCoords() const { return has_coords; }
|
||||
ZoneType getType() const { return type; }
|
||||
QString getName() const { return name; }
|
||||
ServerSocket *getPlayer() const { return player; }
|
||||
Player *getPlayer() const { return player; }
|
||||
|
||||
QList<Card *> cards;
|
||||
void insertCard(Card *card, int x, int y);
|
||||
void shuffle(AbstractRNG *rnd);
|
||||
void shuffle();
|
||||
void clear();
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue