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

Method getMoveText

ChessPieces.cpp:171–183  ·  view source on GitHub ↗

* @brief 获取棋子移动的格数 返回文本棋谱 * @param rowFrom * @param rowTo * @return QString */

Source from the content-addressed store, hash-verified

169 * @return QString
170 */
171QString ChessPieces::getMoveText(int rowFrom, int rowTo)
172{
173 QString temp="";
174 if(m_bRed)
175 {
176 temp.append(colTextRedTurn[abs(rowFrom-rowTo) -1]);
177 }
178 else
179 {
180 temp.append(colTextBlack[abs(rowFrom-rowTo) -1]);
181 }
182 return temp;
183}

Callers 1

textStepMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected