mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Server_CardZone speed optimisation
This commit is contained in:
parent
8b6eace312
commit
733aa6c52b
3 changed files with 62 additions and 49 deletions
|
|
@ -41,6 +41,7 @@ private:
|
|||
QSet<int> playersWithWritePermission;
|
||||
bool alwaysRevealTopCard;
|
||||
QList<Server_Card *> cards;
|
||||
QMap<int, QMap<int, Server_Card *> > coordinateMap; // y -> (x -> card)
|
||||
public:
|
||||
Server_CardZone(Server_Player *_player, const QString &_name, bool _has_coords, ServerInfo_Zone::ZoneType _type);
|
||||
~Server_CardZone();
|
||||
|
|
@ -61,8 +62,9 @@ public:
|
|||
bool isColumnEmpty(int x, int y) const;
|
||||
bool isColumnStacked(int x, int y) const;
|
||||
void fixFreeSpaces(GameEventStorage &ges);
|
||||
void moveCard(GameEventStorage &ges, QMap<int, Server_Card *> &coordMap, Server_Card *card, int x, int y);
|
||||
void moveCardInRow(GameEventStorage &ges, Server_Card *card, int x, int y);
|
||||
void insertCard(Server_Card *card, int x, int y);
|
||||
void updateCardCoordinates(Server_Card *card, int oldX, int oldY);
|
||||
void shuffle();
|
||||
void clear();
|
||||
void addWritePermission(int playerId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue