Export the game: copy moves or download PGN

Abierto
#55 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
72/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
javascript
Área
frontend

Línea de trabajo

Read js/game.js:738-785 and js/game.js:232-233 to trace move history and stored notation, then inspect js/game.js:904 and index.html:21-24 for en passant notation and the page controls. Run npm test and npm run lint as the issue describes. Done when the Copy PGN control produces text accepted by a standard PGN viewer, with correct results for checkmate, stalemate, and unfinished games.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement good first issue severity: medium

Summary

SAN is already generated and stored for every move, but the only output is the on-page move list. A finished game cannot be taken to an analysis board, shared or archived.

Where

  • js/game.js:738-785 (updateMoveHistoryDisplay)
  • js/game.js:232-233 (move.notation stored per move)
  • js/game.js:904 (appends e.p., which PGN parsers reject)
  • index.html:21-24

Proposal

Add a "Copy PGN" button that joins the move history into numbered movetext, adds the seven-tag roster with Result derived from the game state, and writes it to the clipboard (fallback: a download). Drop the e.p. suffix in the exported text. PGN import is a larger follow-up and not part of this.

Who benefits

Players who want to review or share a game.

Acceptance criteria

  • The exported text loads in a standard PGN viewer
  • Result is correct for checkmate, stalemate and unfinished games

Getting started

  • Relevant files: js/game.js, index.html
  • How to run tests: npm install, then npm test and npm run lint
  • Related docs: docs/ARCHITECTURE.md, .github/CONTRIBUTING.md

Filed by repo-audit/full-audit at 8a2c86c. Severity: medium. Effort: S. audit-key: enhancement|js/game.js|updateMoveHistoryDisplay

Lenguaje dominante
JavaScript
Estrellas
4
Forks
2
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de TMHSDigital/Static_Chess

Todos los issues de TMHSDigital/Static_Chess

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.