feat: add texture destory function

This commit is contained in:
2026-01-15 20:49:11 +08:00
parent 4ae99a44a3
commit 562599b8b4
8 changed files with 65 additions and 3 deletions

View File

@@ -3,14 +3,16 @@
#include <optional>
#include <utility>
#include <memory>
#include <functional>
#include "Board.h"
class GameSession {
private:
using GamePieceEventCallback = std::function<void(GamePieceEvent, int x, int y)>;
std::unique_ptr<Board> m_board;
PlayerID m_currentPlayer = PlayerID::P1;
ActionType m_currentActionType = ActionType::GROW;
@@ -23,6 +25,8 @@ private:
GameState m_gameState = GameState::GAME_RUNING;
GamePieceEventCallback m_gamePieceEventCallback;
public:
GameSession();
~GameSession();
@@ -58,4 +62,8 @@ public:
GameState getGameState() const;
void setGamePieceEventCallback(GamePieceEventCallback callback) {
m_gamePieceEventCallback = callback;
}
};