Skip to content

Javascript library to write a PGN (Portable Game Notation) from SAN (Standard Algebric Notation) moves

Notifications You must be signed in to change notification settings

mJeromeDiaz/pgn-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exemple d'utilisation

 const game = new ChessPGN();
 
 game.setHeader("Event", "F/S Return Match");
 game.setHeader("Site", "Belgrade, Serbia JUG");
 game.setHeader("Date", "1992.11.04");
 game.setHeader("Round", "29");
 game.setHeader("White", "Fischer, Robert J.");
 game.setHeader("Black", "Spassky, Boris V.");
 game.setHeader("Result", "1/2-1/2");

 game.addMove("e4");
 game.addMove("e5");
 game.addMove("Nf3");
 game.addMove("Nc6");
 game.addMove("Bb5", "", true); // Coup dans une variante
 game.addMove("a6", "a speculative move!?");

 console.log(game.getPGN());

About

Javascript library to write a PGN (Portable Game Notation) from SAN (Standard Algebric Notation) moves

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published