Esempio n. 1
0
 private function processDirection($currentDirection)
 {
     switch (strtolower($currentDirection)) {
         case self::MOVE_LEFT:
             $this->currentVisitor->moveLeft();
             break;
         case self::MOVE_RIGHT:
             $this->currentVisitor->moveRight();
             break;
         case self::MOVE_UP:
             $this->currentVisitor->moveUp();
             break;
         case self::MOVE_DOWN:
             $this->currentVisitor->moveDown();
             break;
     }
 }