Player refactor.

Took 1 hour 43 minutes

Took 1 minute


Took 23 seconds
This commit is contained in:
Lukas Brübach 2025-09-09 02:28:32 +02:00
parent b8e545bfa4
commit 70c3649d6a
81 changed files with 6591 additions and 5498 deletions

View file

@ -2,6 +2,7 @@
#define PILEZONE_H
#include "card_zone.h"
#include "logic/pile_zone_logic.h"
/**
* A CardZone where the cards are in a single pile instead of being laid out.
@ -17,23 +18,19 @@ private slots:
}
public:
PileZone(Player *_p,
const QString &_name,
bool _isShufflable,
bool _contentsKnown,
QGraphicsItem *parent = nullptr);
QRectF boundingRect() const override;
QPainterPath shape() const override;
PileZone(PileZoneLogic *_logic, QGraphicsItem *parent);
[[nodiscard]] QRectF boundingRect() const override;
[[nodiscard]] QPainterPath shape() const override;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
void reorganizeCards() override;
void handleDropEvent(const QList<CardDragItem *> &dragItems, CardZone *startZone, const QPoint &dropPoint) override;
void
handleDropEvent(const QList<CardDragItem *> &dragItems, CardZoneLogic *startZone, const QPoint &dropPoint) override;
protected:
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
void addCardImpl(CardItem *card, int x, int y) override;
};
#endif