diff options
author | IgrisBRC <[email protected]> | 2024-07-15 10:51:50 +0530 |
---|---|---|
committer | IgrisBRC <[email protected]> | 2024-07-15 10:51:50 +0530 |
commit | 57e8e55e1e5d72011971f3010fa2b584d1d8f16d (patch) | |
tree | 72d002659a2eabbf975fb1f2bb051a3dbdd510cb /public/sync_board.js | |
parent | ec5c55ccf76b74c2e217d06d6bb76ed6760cd165 (diff) |
made some changes to my godawful code
Diffstat (limited to 'public/sync_board.js')
-rw-r--r-- | public/sync_board.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/public/sync_board.js b/public/sync_board.js index 7044db2..739b4a6 100644 --- a/public/sync_board.js +++ b/public/sync_board.js @@ -6,7 +6,7 @@ function sync_board() { for (let j = 0; j < 8; j++) { if (board[i][j] == 0) continue - let square = document.getElementById(`${alphabet.charAt(j)}${8 - i}`) + let square = document.getElementById(`${i}${j}`) let piece = document.createElement('p') piece.classList.add(board[i][j] > 0 ? 'w' : 'b', 'piece') |