while (y >= 0 && $game.$map.currentTiles[x][y].tileState === 0) {
          targetPosition = { x: x, y: y }
          y--
        }