Exemplo n.º 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;
 }
Exemplo n.º 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());
 }
Exemplo n.º 3
0
 /**
  * @depends testBoardCreation
  */
 public function testGetGame(Board $board)
 {
     $this->assertTrue($board->getGame() instanceof Entities\Game);
 }
Exemplo n.º 4
0
 public function __construct(Board $board)
 {
     $this->board = $board;
     $this->game = $board->getGame();
 }