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

Method getRowText

ChessPieces.cpp:134–163  ·  view source on GitHub ↗

* @brief 获取棋子所在行 返回文本棋谱 * @param rowTo * @return QString */

Source from the content-addressed store, hash-verified

132 * @return QString
133 */
134QString ChessPieces::getRowText(int rowTo)
135{
136 QString temp="";
137 if(m_nRow== rowTo)
138 {
139 temp.append("平");
140 return temp;
141 }
142 if(m_nRow> rowTo)
143 {
144 if(m_bRed){
145 temp.append("进");
146 }
147 else
148 {
149 temp.append("退");
150 }
151 }
152 else
153 {
154 if(m_bRed){
155 temp.append("退");
156 }
157 else
158 {
159 temp.append("进");
160 }
161 }
162 return temp;
163}
164
165/**
166 * @brief 获取棋子移动的格数 返回文本棋谱

Callers 1

textStepMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected