mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-09 03:23:24 -08:00
[Refactor] Move the active card from AbstractGame into GameScene
This commit is contained in:
parent
2c80763d99
commit
bb9f38a375
6 changed files with 26 additions and 20 deletions
|
|
@ -18,8 +18,6 @@ AbstractGame::AbstractGame(QObject *_parent) : QObject(_parent)
|
|||
{
|
||||
gameMetaInfo = new GameMetaInfo(this);
|
||||
gameEventHandler = new GameEventHandler(this);
|
||||
|
||||
activeCard = nullptr;
|
||||
}
|
||||
|
||||
bool AbstractGame::isHost() const
|
||||
|
|
@ -48,11 +46,6 @@ void AbstractGame::loadReplay(const GameReplay *replay)
|
|||
gameMetaInfo->setSpectatorsOmniscient(true);
|
||||
}
|
||||
|
||||
void AbstractGame::setActiveCard(CardItem *card)
|
||||
{
|
||||
activeCard = card;
|
||||
}
|
||||
|
||||
CardItem *AbstractGame::getCard(int playerId, const QString &zoneName, int cardId) const
|
||||
{
|
||||
PlayerLogic *player = playerManager->getPlayer(playerId);
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ public:
|
|||
GameState *gameState;
|
||||
GameEventHandler *gameEventHandler;
|
||||
PlayerManager *playerManager;
|
||||
CardItem *activeCard;
|
||||
|
||||
GameMetaInfo *getGameMetaInfo()
|
||||
{
|
||||
|
|
@ -59,12 +58,6 @@ public:
|
|||
void loadReplay(const GameReplay *replay);
|
||||
|
||||
CardItem *getCard(int playerId, const QString &zoneName, int cardId) const;
|
||||
|
||||
void setActiveCard(CardItem *card);
|
||||
CardItem *getActiveCard() const
|
||||
{
|
||||
return activeCard;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // COCKATRICE_ABSTRACT_GAME_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue