| 935 | } |
| 936 | |
| 937 | void 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 | |
| 953 | void ChessBoard::clickPieces(int id, int &row, int &col) |
| 954 | { |
nothing calls this directly
no outgoing calls
no test coverage detected