fix: Correct DOM element IDs for move history and captured pieces #5

Manually merged
Weyoun merged 4 commits from fix/dom-element-id-mismatches into main 2025-11-23 14:46:58 +00:00
Showing only changes of commit b44f071630 - Show all commits

View File

@ -182,7 +182,7 @@ class ChessApp {
* Update move history display * Update move history display
*/ */
updateMoveHistory() { updateMoveHistory() {
const moveList = document.getElementById('move-list'); const moveList = document.getElementById('move-history');
const history = this.game.gameState.moveHistory; const history = this.game.gameState.moveHistory;
if (history.length === 0) { if (history.length === 0) {
@ -211,8 +211,8 @@ class ChessApp {
* Update captured pieces display * Update captured pieces display
*/ */
updateCapturedPieces() { updateCapturedPieces() {
const whiteCaptured = document.getElementById('white-captured'); const whiteCaptured = document.getElementById('captured-white-pieces');
const blackCaptured = document.getElementById('black-captured'); const blackCaptured = document.getElementById('captured-black-pieces');
const captured = this.game.gameState.capturedPieces; const captured = this.game.gameState.capturedPieces;