| 139 | } |
| 140 | |
| 141 | void ChessBoard::whoWin() //谁胜谁负 |
| 142 | { |
| 143 | if(m_ChessPieces[4].m_bDead && !m_ChessPieces[20].m_bDead) |
| 144 | { |
| 145 | reset(); |
| 146 | winMessageBox("提示", "本局结束,红方胜利."); |
| 147 | } |
| 148 | |
| 149 | if(!m_ChessPieces[4].m_bDead && m_ChessPieces[20].m_bDead) |
| 150 | { |
| 151 | reset(); |
| 152 | winMessageBox("提示", "本局结束,黑方胜利."); |
| 153 | } |
| 154 | } |
| 155 | int ChessBoard:: relation(int row1,int col1,int row2,int col2) |
| 156 | { |
| 157 | // 原坐标(row1,col1)与目标坐标(row2,col2)的关系 |
nothing calls this directly
no outgoing calls
no test coverage detected