Пример #1
0
 /**
  * @param integer $steps
  *
  * @throws DomainException If the token is already finished.
  */
 public function move($steps)
 {
     if ($this->isFinished()) {
         throw new DomainException('Once a token has finished, it cannot be moved again.');
     }
     $this->square = $this->square->occupyNext($steps);
 }
Пример #2
0
 /** @test */
 public function squareOccupied()
 {
     $this->start->occupyNext(1);
     $this->assertTrue($this->start->get(1)->isOccupied());
 }