preliminary AlwaysRevealTopCard support related to issue #31, server code cleanup (finally removed getGameState)

This commit is contained in:
Max-Wilhelm Bruker 2012-03-31 21:47:30 +02:00
parent 75bac4a5b9
commit 7417236c3a
28 changed files with 329 additions and 184 deletions

View file

@ -39,6 +39,7 @@ private:
ServerInfo_Zone::ZoneType type;
int cardsBeingLookedAt;
QSet<int> playersWithWritePermission;
bool alwaysRevealTopCard;
public:
Server_CardZone(Server_Player *_player, const QString &_name, bool _has_coords, ServerInfo_Zone::ZoneType _type);
~Server_CardZone();
@ -52,6 +53,7 @@ public:
ServerInfo_Zone::ZoneType getType() const { return type; }
QString getName() const { return name; }
Server_Player *getPlayer() const { return player; }
void getInfo(ServerInfo_Zone *info, Server_Player *playerWhosAsking, bool omniscient);
int getFreeGridColumn(int x, int y, const QString &cardName) const;
bool isColumnEmpty(int x, int y) const;
@ -64,6 +66,8 @@ public:
void clear();
void addWritePermission(int playerId);
const QSet<int> &getPlayersWithWritePermission() const { return playersWithWritePermission; }
bool getAlwaysRevealTopCard() const { return alwaysRevealTopCard; }
void setAlwaysRevealTopCard(bool _alwaysRevealTopCard) { alwaysRevealTopCard = _alwaysRevealTopCard; }
};
#endif