fix some bugs

master
FengJungle 2021-10-30 14:02:27 +08:00
parent cbfbfda1e8
commit 7235d125ef
2 changed files with 10 additions and 0 deletions

View File

@ -134,6 +134,8 @@ public:
builder = nullptr;
}
}
Director(const Director&) = delete;
Director& operator=(const Director&) = delete;
// 具体实现方法
void setBuilder(AbstractBuilder *iBuilder) {
this->builder = iBuilder;

View File

@ -11,6 +11,14 @@ class GameAccount
public:
GameAccount();
GameAccount(string iName);
GameAccount(const GameAccount&) = delete;
GameAccount& operator=(const GameAccount&) = delete;
~GameAccount(){
if(level){
delete level;
level = nullptr;
}
}
string getName();
void win();
void lose();