function generateChessboard() {
for (let row = 0; row < 10; row++) {
for (let col = 0; col < 9; col++) {
const point = document.createElement
('div');
point.classList.add('grid-point');
point.style.gridColumn = col + 1;
point.style.gridRow = row + 1;
chessboard.appendChild(point);
function labelCoordinates() {
horizontalCoordinates.textContent = '水平坐标:'
+ Array.from({ length: 9 }, (_, i) => i + 1
).join(', ');
verticalCoordinates.textContent = '垂直坐标:' +
Array.from({ length: 10 }, (_, i) => i + 1
).join(', ');
function addChessPieces() {