public void move(Direction theD){
      
      if(theD == null) { 
        return;
      }   
      switch(theD) {
        case UP:
          this.y--;
          facingDirection = Direction.UP;
          break;
          
        case DOWN:
          this.y++;
          facingDirection = Direction.DOWN;
          break;
          
        case LEFT:
          this.x--;
          facingDirection = Direction.LEFT;
          break;
          
        case RIGHT:
          this.x++;
          facingDirection = Direction.RIGHT;
          break;
          
        default:
          break;
      }
      
      
      if(y == transferY) { 
        if(x == leftTransferX) { 
          x = rightTransferX;
        }
        else if(x == rightTransferX) { 
          x = leftTransferX;
        }
      }
    }