This commit is contained in:
Admin
2023-04-13 14:02:08 +08:00
commit 33c813630f
57 changed files with 27736 additions and 0 deletions

32
Make/sudoku/command.h Normal file
View File

@@ -0,0 +1,32 @@
#ifndef _SUDOKU_COMMAND_H_
#define _SUDOKU_COMMAND_H_
#include <memory>
#include "common.h"
class CScene;
class CCommand
{
public:
CCommand(CScene* pOwner);
CCommand(CScene *pOwner, const point_t &point, int preValue, int curValue);
CCommand(const CCommand &);
~CCommand();
bool execute(int nInputValue);
void undo();
point_t getPoint() { return _stPoint; }
int getPreValue() { return _nPreValue; }
int getCurValue() { return _nCurValue; }
void setPoint(const point_t &point) { _stPoint = point; }
void setPreValue(int preValue) { _nPreValue = preValue; }
void setCurValue(int curValue) { _nCurValue = curValue; }
private:
CScene* _pOwner;
point_t _stPoint;
int _nPreValue;
int _nCurValue; // actually the member is never used
};
#endif