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

Method clickPieces

NetworkGame.cpp:176–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174}
175
176void NetworkGame::clickPieces(int checkedID, int &row, int &col)
177{
178 // 本地只能选中己方棋子,禁止移动对手棋子
179 if (m_nSelectID == -1 && checkedID >= 0 && checkedID < 32) {
180 if (m_ChessPieces[checkedID].m_bRed != m_bIsTcpServer)
181 return;
182 }
183
184 whoWin();
185
186 ChessBoard::clickPieces(checkedID, row, col);
187 char arry[3];
188 arry[0] = checkedID;
189 arry[1] = row;
190 arry[2] = col;
191
192 if(m_tcpSocket)
193 m_tcpSocket->write(arry, 3);
194}
195
196void NetworkGame::slotNewConnection()
197{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected