Skip to content

Commit

Permalink
perf: for board empty. 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
Joker2770 committed Apr 11, 2023
1 parent 18dad2c commit d4f21ea
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1179,6 +1179,12 @@ void MainWindow::OnActionPause()
this->m_p2_name.clear();

this->mState = GAME_STATE::PAUSING;

if (this->mBoard->GetState() == BOARDSTATUS::BOARDEMPTY)
{
this->mState = GAME_STATE::IDLE;
this->pRuleActionGroup->setEnabled(true);
}
}
}

Expand Down Expand Up @@ -1479,6 +1485,12 @@ void MainWindow::OnActionEnd()
this->m_p2_name.clear();

this->mState = GAME_STATE::PAUSING;

if (this->mBoard->GetState() == BOARDSTATUS::BOARDEMPTY)
{
this->mState = GAME_STATE::IDLE;
this->pRuleActionGroup->setEnabled(true);
}
}
}

Expand Down

0 comments on commit d4f21ea

Please sign in to comment.