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

Method canMovePAO

ChessBoard.cpp:870–884  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

868}
869
870bool ChessBoard::canMovePAO(int moveId, int killId, int row, int col)
871{
872 int ret = getStoneCountAtLine(row, col, m_ChessPieces[moveId].m_nRow, m_ChessPieces[moveId].m_nCol);
873 if(killId != -1)
874 {
875 if(ret == 1)
876 return true;
877 }
878 else
879 {
880 if(ret == 0)
881 return true;
882 }
883 return false;
884}
885
886bool ChessBoard::canMoveBING(int moveId, int killId, int row, int col)
887{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected