This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Chess\PGN\AN; | |
use Chess\Exception\UnknownNotationException; | |
use Chess\PGN\AbstractNotation; | |
use Chess\PGN\ValidationInterface; | |
/** | |
* Square. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Chess\Randomizer\Checkmate; | |
use Chess\PGN\AN\Square; | |
use Chess\Randomizer\Randomizer; | |
class TwoBishopsRandomizer extends Randomizer | |
{ | |
public function __construct(string $turn) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Chess\Tests\Unit; | |
use Chess\Randomizer; | |
use Chess\FEN\BoardToStr; | |
use Chess\PGN\AN\Color; | |
use Chess\Tests\AbstractUnitTestCase; | |
class RandomizerTest extends AbstractUnitTestCase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Chess; | |
use Chess\PGN\AN\Color; | |
use Chess\Piece\K; | |
use Chess\Piece\RType; | |
/** | |
* Randomizer. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$game = new Game(Game::MODE_STOCKFISH, __DIR__.'/../data/players.json'); | |
$game->play('w', 'e4'); | |
$ai = $game->ai(['Skill Level' => 9], ['depth' => 3]); | |
print_r($ai); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once __DIR__ . '/vendor/autoload.php'; | |
use Chess\Game; | |
$game = new Game(Game::MODE_STOCKFISH); | |
$game->play('w', 'e4'); | |
echo $game->getBoard()->toAsciiString() . PHP_EOL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
COPIED FROM https://build.opensuse.org/package/view_file/games/stockfish/stockfish-interface.txt?expand=1 | |
Description of the universal chess interface (UCI) April 2006 | |
================================================================= | |
* The specification is independent of the operating system. For Windows, | |
the engine is a normal exe file, either a console or "real" windows application. | |
* all communication is done via standard input and output with text commands, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Chess\Piece; | |
use Chess\Board; | |
use Chess\Exception\UnknownNotationException; | |
use Chess\PGN\AN\Color; | |
use Chess\PGN\AN\Piece; | |
use Chess\PGN\AN\Square; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Chess; | |
use Chess\Array\AsciiArray; | |
use Chess\Eval\DefenseEval; | |
use Chess\Eval\PressureEval; | |
use Chess\Eval\SpaceEval; | |
use Chess\Eval\SqEval; | |
use Chess\Exception\BoardException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Chess\Piece; | |
use Chess\Board; | |
trait PieceObserverBoardTrait | |
{ | |
public function setBoard(Board $board): void | |
{ |