Example #1
0
 public function addTile(Tile $tile, $distance = 0)
 {
     $coreIsNotYetBuilt = !$this->coreIsBuilt;
     if ($coreIsNotYetBuilt) {
         $this->tiles[] = [$tile->getCoordinates(), $distance];
     } else {
         throw new LittleMapCannotGrowException();
     }
 }
Example #2
0
 public function testConstructorWithoutParameters()
 {
     $tile = new Tile();
     $this->assertTrue([0, 0] === $tile->getCoordinates());
 }