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