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

Method saveStep

MachineGame.cpp:33–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33void MachineGame::saveStep(int selectID, int checkedID, int row, int col, QVector<ChessStep *> &steps)
34{
35 ChessStep* step = new ChessStep;
36 step->m_nRowFrom = m_ChessPieces[selectID].m_nRow;
37 step->m_nColFrom = m_ChessPieces[selectID].m_nCol;
38 step->m_nRowTo = row;
39 step->m_nnColTo = col;
40 step->m_nMoveID = selectID;
41 step->m_nKillID = checkedID;
42 steps.append(step);
43}
44
45void MachineGame::getAllMoves(QVector<ChessStep *> &steps, bool forRed)
46{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected