Export the game: copy moves or download PGN

Offen
#55 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
72/100
Issue-Typ
Feature
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
javascript
Bereich
frontend

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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

Vorherrschende Sprache
JavaScript
Sterne
4
Forks
2
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus TMHSDigital/Static_Chess

Alle Issues in TMHSDigital/Static_Chess

Ähnliche Issues

Weitere Issues zu JavaScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.