public function __construct(Board $board, Stack $stack = null) { $this->board = $board; $this->game = $board->getGame(); $this->analyser = new Analyser($this->board); $this->stack = $stack; }
/** * @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()); }
/** * @depends testBoardCreation */ public function testGetGame(Board $board) { $this->assertTrue($board->getGame() instanceof Entities\Game); }
public function __construct(Board $board) { $this->board = $board; $this->game = $board->getGame(); }