MCPcopy Create free account
hub / github.com/XMuli/ChineseChess / backOne

Method backOne

ChessBoard.cpp:1060–1080  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1058}
1059
1060void ChessBoard::backOne()
1061{
1062 if (this->m_ChessSteps.size() == 0 || m_bIsOver) {
1063 return;
1064 }
1065
1066 ChessStep* step = this->m_ChessSteps.last();
1067 m_ChessSteps.removeLast();
1068 back(step);
1069
1070 update();
1071 delete step;
1072 m_Chessvoice.voiceBack();
1073
1074 // 悔棋到第0步时停止计时器
1075 if (m_ChessSteps.size() == 0 && m_bTimerAutoStarted) {
1076 pauseGameTimer();
1077 m_bTimerAutoStarted = false;
1078 ui->pushButton_start->setText("开始");
1079 }
1080}
1081
1082void ChessBoard::back(ChessStep* step)
1083{

Callers

nothing calls this directly

Calls 1

voiceBackMethod · 0.80

Tested by

no test coverage detected