mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
server-side part of client -> server commands almost converted to ProtocolBuffers. not usable yet
This commit is contained in:
parent
ca3a7e69a1
commit
4eb9dfc5bf
26 changed files with 1233 additions and 1436 deletions
|
|
@ -20,22 +20,14 @@ enum ResponseCode { RespNothing, RespOk, RespNotInRoom, RespInternalError, RespI
|
|||
// list index, whereas cards in any other zone are referenced by their ids.
|
||||
enum ZoneType { PrivateZone, PublicZone, HiddenZone };
|
||||
|
||||
class CardToMove : public SerializableItem_Map {
|
||||
public:
|
||||
CardToMove(int _cardId = -1, bool _faceDown = false, const QString &_pt = QString(), bool _tapped = false);
|
||||
static SerializableItem *newItem() { return new CardToMove; }
|
||||
int getCardId() const { return static_cast<SerializableItem_Int *>(itemMap.value("card_id"))->getData(); }
|
||||
bool getFaceDown() const { return static_cast<SerializableItem_Bool *>(itemMap.value("facedown"))->getData(); }
|
||||
QString getPT() const { return static_cast<SerializableItem_String *>(itemMap.value("pt"))->getData(); }
|
||||
bool getTapped() const { return static_cast<SerializableItem_Bool *>(itemMap.value("tapped"))->getData(); }
|
||||
};
|
||||
|
||||
class GameTypeId : public SerializableItem_Int {
|
||||
public:
|
||||
GameTypeId(int _gameTypeId = -1) : SerializableItem_Int("game_type_id", _gameTypeId) { }
|
||||
static SerializableItem *newItem() { return new GameTypeId; }
|
||||
GameTypeId(int _gameTypeId = -1) : SerializableItem_Int("game_type_id", _gameTypeId) { }
|
||||
static SerializableItem *newItem() { return new GameTypeId; }
|
||||
};
|
||||
|
||||
|
||||
|
||||
class ServerInfo_User : public SerializableItem_Map {
|
||||
public:
|
||||
enum UserLevelFlags {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue