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

Method getStoneId

ChessBoard.cpp:98–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98int ChessBoard::getStoneId(int row, int col)
99{
100 for(int i=0; i<32; ++i)
101 {
102 if(m_ChessPieces[i].m_nRow == row && m_ChessPieces[i].m_nCol == col && !isDead(i))
103 return i;
104 }
105
106 return -1;
107}
108
109int ChessBoard::getStoneCountAtLine(int row1, int col1, int row2, int col2)
110{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected