| 836 | } |
| 837 | |
| 838 | bool ChessBoard::canMoveMA(int moveId, int killId, int row, int col) |
| 839 | { |
| 840 | Q_UNUSED(killId); |
| 841 | int d=relation(m_ChessPieces[moveId].m_nRow, m_ChessPieces[moveId].m_nCol, row, col); |
| 842 | if(d!=12 && d!=21) |
| 843 | return false; |
| 844 | |
| 845 | //蹩马脚 |
| 846 | if(d==12) |
| 847 | { |
| 848 | if(getStoneId(m_ChessPieces[moveId].m_nRow, (m_ChessPieces[moveId].m_nCol+ col) /2) != -1) |
| 849 | return false; |
| 850 | } |
| 851 | else |
| 852 | { |
| 853 | if(getStoneId((m_ChessPieces[moveId].m_nRow+ row) /2 ,m_ChessPieces[moveId].m_nCol) != -1) |
| 854 | return false; |
| 855 | } |
| 856 | |
| 857 | return true; |
| 858 | } |
| 859 | |
| 860 | bool ChessBoard::canMoveCHE(int moveId, int killId, int row, int col) |
| 861 | { |
nothing calls this directly
no outgoing calls
no test coverage detected