Skip to content

Commit

Permalink
fix: change name. 🎨
Browse files Browse the repository at this point in the history
  • Loading branch information
Joker2770 committed Apr 3, 2023
1 parent 3f01d21 commit e02a2a2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/renju.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion src/renju.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e02a2a2

Please sign in to comment.