mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-05 09:33:25 -08:00
* [Refactor] Move game logic into libcockatrice_game * [Refactor] Include card_state.h in player_actions.h * [Game] Inject settings providers into libcockatrice_game, drop Widgets * [Game] Follow base rename to createCardRequested after rebase * [Game] Drop unused CardItem forward declaration * [Game] Fix includes after moving game logic into libcockatrice_game --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
63 lines
1.2 KiB
C++
63 lines
1.2 KiB
C++
/**
|
|
* @file abstract_game.h
|
|
* @ingroup GameLogic
|
|
*/
|
|
//! \todo Document this file.
|
|
|
|
#ifndef COCKATRICE_ABSTRACT_GAME_H
|
|
#define COCKATRICE_ABSTRACT_GAME_H
|
|
|
|
#include <QObject>
|
|
#include <QString>
|
|
#include <qtmetamacros.h>
|
|
|
|
class AbstractClient;
|
|
class CardState;
|
|
class GameEventHandler;
|
|
class GameMetaInfo;
|
|
class GameReplay;
|
|
class GameState;
|
|
class PlayerManager;
|
|
class CardState;
|
|
class AbstractGame : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit AbstractGame(QObject *parent);
|
|
|
|
GameMetaInfo *gameMetaInfo;
|
|
GameState *gameState;
|
|
GameEventHandler *gameEventHandler;
|
|
PlayerManager *playerManager;
|
|
|
|
GameMetaInfo *getGameMetaInfo()
|
|
{
|
|
return gameMetaInfo;
|
|
}
|
|
|
|
GameState *getGameState() const
|
|
{
|
|
return gameState;
|
|
}
|
|
|
|
GameEventHandler *getGameEventHandler() const
|
|
{
|
|
return gameEventHandler;
|
|
}
|
|
|
|
PlayerManager *getPlayerManager() const
|
|
{
|
|
return playerManager;
|
|
}
|
|
|
|
bool isHost() const;
|
|
|
|
AbstractClient *getClientForPlayer(int playerId) const;
|
|
|
|
void loadReplay(const GameReplay *replay);
|
|
|
|
CardState *getCard(int playerId, const QString &zoneName, int cardId) const;
|
|
};
|
|
|
|
#endif // COCKATRICE_ABSTRACT_GAME_H
|