Clean up game scene code.

Took 18 minutes
This commit is contained in:
Lukas Brübach 2025-09-26 20:26:45 +02:00
parent 891e7bf6e4
commit 100b363892
2 changed files with 229 additions and 143 deletions

View file

@ -50,6 +50,16 @@ public:
void startRubberBand(const QPointF &selectionOrigin);
void resizeRubberBand(const QPointF &cursorPoint);
void stopRubberBand();
QList<Player *> collectActivePlayers(int &firstPlayerIndex) const;
QList<Player *> rotatePlayers(const QList<Player *> &players, int firstPlayerIndex) const;
int determineColumnCount(int playerCount) const;
QSizeF computeSceneSizeAndPlayerLayout(const QList<Player *> &playersPlaying, int columns);
QList<qreal> calculateMinWidthByColumn() const;
qreal calculateNewSceneWidth(const QSize &newSize, qreal minWidth) const;
void resizeColumnsAndPlayers(const QList<qreal> &minWidthByColumn, qreal newWidth);
CardZone *findTopmostZone(const QList<QGraphicsItem *> &items) const;
CardItem *findTopmostCardInZone(const QList<QGraphicsItem *> &items, CardZone *zone) const;
void updateHoveredCard(CardItem *newCard);
void registerAnimationItem(AbstractCardItem *item);
void unregisterAnimationItem(AbstractCardItem *card);