qt: Change some comment

This commit is contained in:
Calcitem 2021-01-05 00:22:52 +08:00
parent ca495f1f49
commit 54576b0617
2 changed files with 5 additions and 5 deletions

View File

@ -26,10 +26,10 @@ BoardItem::BoardItem(QGraphicsItem *parent) :
{
Q_UNUSED(parent)
// The center of the board is in the center of the scene
// Put center of the board in the center of the scene
setPos(0, 0);
// Initialize 24 drop points
// Initialize 24 points
for (int r = 0; r < FILE_NB; r++) {
// The first position is the 12 o'clock direction of the inner ring, which is sorted clockwise
// Then there is the middle ring and the outer ring
@ -178,7 +178,7 @@ bool BoardItem::pos2polar(QPointF pos, File &file, Rank &rank)
{
// Look for the nearest spot
for (int i = 0; i < EFFECTIVE_SQUARE_NB; i++) {
// If the pos point is near the falling point
// If the pos point is near the placing point
if (QLineF(pos, position[i]).length() < PIECE_SIZE / 6) {
file = File(i / RANK_NB + 1);
rank = Rank(i % RANK_NB + 1);

View File

@ -49,10 +49,10 @@ public:
return Type;
}
//Set with or without slash
// Set with or without diagonal
void setDiagonal(bool arg = true);
//Return to the nearest drop point
// Return to the nearest placing point
QPointF nearestPosition(QPointF pos);
// The circle and position of the model are transformed into the point coordinates