PGN Chess

Build Status Documentation Status License: GPL v3

PGN Chess is a chess board representation to play and validate PGN games (player vs player). It also provides with a PHP CLI command to seed a database with PGN games.


Via composer:

$ composer require programarivm/pgn-chess


Just instantiate a game and play PGN moves:


use PGNChess\Game;

$game = new Game;

$isLegalMove = $game->play('w', 'e4');

All action takes place in the $game object. The call to the $game->play method returns true or false depending on whether or not a chess move can be run on the board.


For further information please read the Documentation.


The GNU General Public License.


Would you help make this library better? Contributions are welcome.

  • Feel free to send a pull request
  • Drop an email at with the subject "PGN Chess Contributions"
  • Leave me a comment on Twitter
  • Say hello on Google+

Many thanks.