| 788 | } |
| 789 | |
| 790 | bool ChessBoard::canMoveSHI(int moveId, int killId, int row, int col) |
| 791 | { |
| 792 | Q_UNUSED(killId); |
| 793 | if(isRed(moveId)) //红 士 |
| 794 | { |
| 795 | if(row < 7 || col < 3 || col > 5) return false; |
| 796 | } |
| 797 | else //黑 士 |
| 798 | { |
| 799 | if(row > 2 || col < 3 || col > 5) return false; |
| 800 | } |
| 801 | |
| 802 | int d=relation(m_ChessPieces[moveId].m_nRow, m_ChessPieces[moveId].m_nCol, row, col); |
| 803 | if(d == 11) |
| 804 | return true; |
| 805 | |
| 806 | return false; |
| 807 | } |
| 808 | |
| 809 | bool ChessBoard::canMoveXIANG(int moveId, int killId, int row, int col) |
| 810 | { |
nothing calls this directly
no outgoing calls
no test coverage detected