diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index aed420b..af33b3a 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -546,7 +546,7 @@ void MainWindow::mousePressEvent(QMouseEvent * e) } else if (this->mRule == GAME_RULE::RENJU) { - if (!this->m_renju->isIllegal(this->mBoard)) + if (!this->m_renju->isLegal(this->mBoard)) { this->OnActionEnd(); this->mState = GAME_STATE::OVER; @@ -1058,7 +1058,7 @@ void MainWindow::OnActionPlayerSetting() void MainWindow::OnActionVer() { - const QString strVerNum = "Ver Num: 0.2.01\n"; + const QString strVerNum = "Ver Num: 0.2.04\n"; QString strBuildTime = "Build at "; strBuildTime.append(__TIMESTAMP__); strBuildTime.append("\n"); @@ -1182,7 +1182,7 @@ void MainWindow::OnP1PlaceStone(int x, int y) } else if (this->mRule == GAME_RULE::RENJU) { - if (!this->m_renju->isIllegal(this->mBoard)) + if (!this->m_renju->isLegal(this->mBoard)) { this->OnActionEnd(); this->mState = GAME_STATE::OVER; @@ -1304,7 +1304,7 @@ void MainWindow::OnP2PlaceStone(int x, int y) } else if (this->mRule == GAME_RULE::RENJU) { - if (!this->m_renju->isIllegal(this->mBoard)) + if (!this->m_renju->isLegal(this->mBoard)) { this->OnActionEnd(); this->mState = GAME_STATE::OVER; diff --git a/src/renju.cpp b/src/renju.cpp index f024bcd..726dd35 100644 --- a/src/renju.cpp +++ b/src/renju.cpp @@ -511,7 +511,7 @@ bool Renju::isThree(Board *board) return false; } -bool Renju::isIllegal(Board *board) +bool Renju::isLegal(Board *board) { if (board->getVRecord().back().second == STONECOLOR::BLACK) { diff --git a/src/renju.h b/src/renju.h index bc595bb..e8087d6 100644 --- a/src/renju.h +++ b/src/renju.h @@ -64,7 +64,7 @@ class Renju final : public rules public: bool checkWin(Board *board) override; //after checkWin - bool isIllegal(Board *board); + bool isLegal(Board *board); int getRenjuState(); private: bool isOverLine(Board *board);