* wip fix card moving on server

* fix flipped cards being moved as -1

* fix cards from hand being moved as -1
This commit is contained in:
ebbit1q 2021-12-08 04:56:58 +01:00 committed by GitHub
parent d1a40fd36e
commit 811ee54c76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 128 additions and 132 deletions

View file

@ -37,7 +37,7 @@ class Server_CardZone
private:
Server_Player *player;
QString name;
bool has_coords;
bool has_coords; // having coords means this zone has x and y coordinates
ServerInfo_Zone::ZoneType type;
int cardsBeingLookedAt;
QSet<int> playersWithWritePermission;
@ -59,6 +59,7 @@ public:
return cards;
}
int removeCard(Server_Card *card);
int removeCard(Server_Card *card, bool &wasLookedAt);
Server_Card *getCard(int id, int *position = nullptr, bool remove = false);
int getCardsBeingLookedAt() const
@ -69,6 +70,7 @@ public:
{
cardsBeingLookedAt = _cardsBeingLookedAt;
}
bool isCardAtPosLookedAt(int pos) const;
bool hasCoords() const
{
return has_coords;