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

Method click

ChessBoard.cpp:937–951  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

935}
936
937void ChessBoard::click(QPointF pt)
938{
939 // 看有没有点中象棋
940 // 将pt转化成象棋的行列值
941 // 判断这个行列值上面有没有棋子
942 int row, col;
943 bool bClicked = isChecked(pt, row, col);
944 if (!bClicked) {
945 return;
946 }
947
948 int id = getStoneId(row, col);
949 clickPieces(id, row, col);
950
951}
952
953void ChessBoard::clickPieces(int id, int &row, int &col)
954{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected