| 174 | } |
| 175 | |
| 176 | void 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 | |
| 196 | void NetworkGame::slotNewConnection() |
| 197 | { |
nothing calls this directly
no outgoing calls
no test coverage detected