case 'right':
        x = location.x
        while ((x <= $game.VIEWPORT_WIDTH - 1) && $game.$map.currentTiles[x][y].tileState === 0) {
          targetPosition = { x: x, y: y }
          x++