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.

Install

Via composer:

$ composer require programarivm/pgn-chess

Instantiation

Just instantiate a game and play PGN moves:

<?php

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.

Documentation

For further information please read the Documentation.

License

The GNU General Public License.

Contributions

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

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

Many thanks.