[Game/Zones] Simple move refactor to differentiate between logic and graphics for zones (#6903)

* [Game/Zones] Simple move refactor to differentiate between logic and graphics for zones

Took 21 minutes

* Clean up game/zones/logic folder.

Took 6 minutes

* Adjust tests.

Took 3 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
BruebachL 2026-05-18 06:36:18 +02:00 committed by GitHub
parent bb1a5b33a1
commit cba9ce2b2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
47 changed files with 107 additions and 107 deletions

View file

@ -0,0 +1,40 @@
/**
* @file table_zone_logic.h
* @ingroup GameLogicZones
* @brief TODO: Document this.
*/
#ifndef COCKATRICE_TABLE_ZONE_LOGIC_H
#define COCKATRICE_TABLE_ZONE_LOGIC_H
#include "card_zone_logic.h"
class TableZoneLogic : public CardZoneLogic
{
Q_OBJECT
signals:
void contentSizeChanged();
void toggleTapped();
public:
TableZoneLogic(Player *_player,
const QString &_name,
bool _hasCardAttr,
bool _isShufflable,
bool _contentsKnown,
QObject *parent = nullptr);
protected:
void addCardImpl(CardItem *card, int x, int y) override;
/**
* @brief Removes a card from view.
*
* @param position card position
* @param cardId id of card to take
* @param toNewZone Whether the destination of the card is not the same as the starting zone. Defaults to true
* @return CardItem that has been removed
*/
CardItem *takeCard(int position, int cardId, bool toNewZone = true) override;
};
#endif // COCKATRICE_TABLE_ZONE_LOGIC_H