public function testDiagonal() { $this->boardWalker->start(SquareInterface::POSITION_D5)->diagonal(1); $this->assertEquals(SquareInterface::POSITION_D5, $this->boardWalker->getPosition(), 'Position should stay the same after calling diagonal()'); $this->assertCount(4, $this->boardWalker->flush(), 'There should be 4 moves returned by flush() after calling diagonal(1)'); $this->boardWalker->diagonal(2); $this->assertCount(8, $this->boardWalker->flush(), 'There should be 8 moves returned by flush() after calling diagonal(2)'); }
/** * {@inheritdoc} */ public function configureWalker(BoardWalker $walker, GameInterface $game) { $walker->diagonal('*'); }