fix: correct DOM element IDs for move history and captured pieces
Some checks failed
Some checks failed
Fixes #2 and #3 - DOM element ID mismatches causing UI features to fail Changes: - Update move history element ID from 'move-list' to 'move-history' (line 185) - Update white captured pieces ID from 'white-captured' to 'captured-white-pieces' (line 214) - Update black captured pieces ID from 'black-captured' to 'captured-black-pieces' (line 215) These changes align JavaScript DOM queries with the actual element IDs defined in index.html, enabling move history and captured pieces displays to function correctly. Impact: - Move history now displays correctly in the UI sidebar - Captured pieces now display correctly for both white and black - No changes to game logic or business rules - Zero regression risk (simple ID corrections) Testing: - ESLint passes with 0 errors (6 warnings pre-existing) - Changes verified against HTML element IDs in index.html 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
e83b8c6c69
commit
82479fb8c7
@ -182,7 +182,7 @@ class ChessApp {
|
||||
* Update move history display
|
||||
*/
|
||||
updateMoveHistory() {
|
||||
const moveList = document.getElementById('move-list');
|
||||
const moveList = document.getElementById('move-history');
|
||||
const history = this.game.gameState.moveHistory;
|
||||
|
||||
if (history.length === 0) {
|
||||
@ -211,8 +211,8 @@ class ChessApp {
|
||||
* Update captured pieces display
|
||||
*/
|
||||
updateCapturedPieces() {
|
||||
const whiteCaptured = document.getElementById('white-captured');
|
||||
const blackCaptured = document.getElementById('black-captured');
|
||||
const whiteCaptured = document.getElementById('captured-white-pieces');
|
||||
const blackCaptured = document.getElementById('captured-black-pieces');
|
||||
|
||||
const captured = this.game.gameState.capturedPieces;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user