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

Method doMoveStone

ChessBoard.cpp:994–1010  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

992}
993
994void ChessBoard::doMoveStone(int moveid, int killid, int row, int col)
995{
996 autoStartTimerIfNeeded();
997 saveStep(moveid, killid, row, col, m_ChessSteps);
998
999 killStone(killid);
1000 moveStone(moveid, row, col);
1001 whoWin();
1002
1003 if(killid== -1)
1004 m_Chessvoice.voiceMove(); //移动音效
1005 else
1006 m_Chessvoice.voiceEat(); //吃子音效
1007
1008 if(isGeneral())
1009 m_Chessvoice.voiceGeneral(); //将军音效
1010}
1011
1012void ChessBoard::saveStep(int moveid, int killid, int row, int col, QVector<ChessStep*>& steps)
1013{

Callers

nothing calls this directly

Calls 3

voiceMoveMethod · 0.80
voiceEatMethod · 0.80
voiceGeneralMethod · 0.80

Tested by

no test coverage detected