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

Method whoWin

ChessBoard.cpp:141–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139}
140
141void 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}
155int ChessBoard:: relation(int row1,int col1,int row2,int col2)
156{
157 // 原坐标(row1,col1)与目标坐标(row2,col2)的关系

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected