资 源 简 介
Note: This project has been forked on Github at https://github.com/NicoNet/PHPcheckmate
phpcheckmate is a chess framework written in php. Providing moves validation and game recording allowing us to tack pieces back. The project is object oriented and contains several classes.
phpcheckmate is a php portage of the piece of code written in Perl by Brian Richardson.
```
$game = new Game();
$game->make_move("e2", "e3");
$game->make_move("f7", "f6");
$game->make_move("d2", "d3");
$game->make_move("g7", "g5");
$game->make_move("d1", "h5");
vardump($game->playercheckmated("black")); //true #Player2 checkmated
var_dump($game->result()); //1 #Game is over
$game->takebackmove(); #Take back last move
vardump($game->playercheckmated("black")); //false #Player2 NOT chec