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