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.
$ composer require programarivm/pgn-chess
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
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 firstname.lastname@example.org with the subject "PGN Chess Contributions"
- Leave me a comment on Twitter
- Say hello on Google+