Last active
August 29, 2015 13:57
-
-
Save wodor/9750982 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace WodorNet\Vindinium; | |
| class Board | |
| { | |
| public function getSurroundingPassableTiles(Position $position) | |
| { | |
| foreach ($this->surroundingTiles($position) as $tile) { | |
| if ($tile->isPassable()) { | |
| yield $tile; | |
| } | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Do you want me to create `Generator::hasCount()` for you? | |
| [PhpSpec\Exception\Example\ErrorException] | |
| warning: file_get_contents(/Users/wodor/prg/vindinium-starter-php/src/Generator.php): failed to open stream: No such file or directory in /Users/wodor/prg/vindinium-starter-php/vendor/phpspec/phpspec/src/PhpSpec/Util/Filesystem.php line 39 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class BoardSpec extends ObjectBehavior | |
| { | |
| function it_finds_surrounding_passable_tiles() | |
| { | |
| $this->getSurroundingPassableTiles(new Position(3,3)) | |
| ->shouldHaveCount(2); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment