A chess library for PHP.
Via composer:
$ composer require chesslablab/php-chess
use Chess\Game;
$game = new Game();
$game->play('w', 'e4');
$game->play('b', 'e5');
The call to the $game->play
method returns true
or false
depending on whether or not a chess move can be made.
Read the latest docs here.
PHP Chess is being used on Redux Chess, which is a React chessboard connected to a PHP Chess Server. Check out this demo.
Please note the sandbox server might not be up and running all the time.
The GNU General Public License.
See the contributing guidelines.
Happy learning and coding! Thank you, and keep it up.