123456789101112131415161718192021222324252627282930313233343536373839 |
- #include <vector>
- #include <UnitsQueue.h>
- #include <PlayerManager.h>
- class Cell;
- class GameManager : public QObject
- {
- private:
- std::vector< std::vector< Cell* > > game_table_;
- int col_table_size_, row_table_size_;
- void generateTable();
- void printAll();
- /******************************/
- UnitsQueue turn_queue_;
- PlayerManager* player_manager_;
- int cur_player_id_;
- public:
- void buildGameTable(int, int);
- static GameManager& getInstance() {
- static GameManager instance;
- return instance;
- }
- UnitsQueue* getTurnQueue();
- void AddToUnitQueue(Unit* unit);
- void RmFromUnitQueue(Unit* unit);
- Player* getCurrentPlayer();
- int getCurPlayerId();
- private:
- explicit GameManager(QObject *parent = nullptr);
- };
|