예제 #1
0
 public function __construct(Board $board, Stack $stack = null)
 {
     $this->board = $board;
     $this->game = $board->getGame();
     $this->analyser = new Analyser($this->board);
     $this->stack = $stack;
 }
예제 #2
0
 /**
  * @depends testGetBoard
  */
 public function testGetBasicTargetSquaresEnPassant(Board $board)
 {
     $board->getGame()->setTurns(10);
     $piece = $board->getPieceByKey('f2');
     $piece->setY('5');
     $piece->setFirstMove(1);
     $board->getPieceByKey('g7')->setY(5);
     $board->getPieceByKey('g7')->setFirstMove(9);
     $board->compile();
     $expected = array('f6');
     $this->assertSquareKeys($expected, $piece->getBasicTargetKeys());
 }
예제 #3
0
 /**
  * @depends testBoardCreation
  */
 public function testGetGame(Board $board)
 {
     $this->assertTrue($board->getGame() instanceof Entities\Game);
 }
예제 #4
0
 public function __construct(Board $board)
 {
     $this->board = $board;
     $this->game = $board->getGame();
 }