# Always Ran Out of Time on Backwoods Standoff A \[SOLVED\]

**URL:** <https://discourse.codecombat.com/t/always-ran-out-of-time-on-backwoods-standoff-a-solved/17976>\
**Category:** Level Help\
**Created:** [March 25, 2019, 12:02am UTC](https://discourse.codecombat.com/t/always-ran-out-of-time-on-backwoods-standoff-a-solved/17976 "2019-03-25T00:02:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jabari26](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@jabari26](https://discourse.codecombat.com/u/jabari26)\
**Post date:** [March 25, 2019, 12:02am UTC](https://discourse.codecombat.com/t/always-ran-out-of-time-on-backwoods-standoff-a-solved/17976/1 "2019-03-25T00:02:56Z")

</div>

My hero Hattori seems to have enough speed,but this level always ends with “Ran out of time”  
Sometimes he seems to cleave when there are too few enemies around, so he spends too much time fighting individual enemies.How do I not run out of time but still kill all the enemies

```python
while True:
    enemy = hero.findNearestEnemy()
    # Use an if-statement with isReady to check "cleave":
    if hero.isReady("cleave") and hero.distanceTo(enemy) <10:
        
        # Cleave!
        hero.cleave(enemy)
    # Else, if cleave is not ready:
    else:
        
        # Attack the nearest ogre.
        hero.attack(enemy)

```

---

<div class="post-metadata">

**Author:** ![brooksy125](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/brooksy125/32/9966_2.png) [@brooksy125](https://discourse.codecombat.com/u/brooksy125)\
**Post date:** [March 25, 2019, 2:13am UTC](https://discourse.codecombat.com/t/always-ran-out-of-time-on-backwoods-standoff-a-solved/17976/2 "2019-03-25T02:13:35Z")

</div>

Not sure what to tell you. Your code works for me. One note, you don’t have to add the hero.distanceTo(enemy). The enemies are timed out to match the cleave.

 ![Backwoods%20Standoff%20A](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/2X/c/ceffbc57f36fa7c35bf0d762859e54541a10c8e9.jpeg)

---

<div class="post-metadata">

**Author:** ![MunkeyShynes](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/munkeyshynes/32/9277_2.png) [@MunkeyShynes](https://discourse.codecombat.com/u/MunkeyShynes)\
**Post date:** [March 25, 2019, 2:18am UTC](https://discourse.codecombat.com/t/always-ran-out-of-time-on-backwoods-standoff-a-solved/17976/3 "2019-03-25T02:18:23Z")

</div>

Hi Jabari! Welcome to Discourse.

Use Tharin instead of Hattori. You’ll pass with Tharin. His health multiplier is higher.

---

<div class="post-metadata">

**Author:** ![jabari26](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@jabari26](https://discourse.codecombat.com/u/jabari26)\
**Post date:** [March 25, 2019, 4:09am UTC](https://discourse.codecombat.com/t/always-ran-out-of-time-on-backwoods-standoff-a-solved/17976/4 "2019-03-25T04:09:45Z")

</div>

Even with Tharin I do not pass

---

<div class="post-metadata">

**Author:** ![jabari26](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@jabari26](https://discourse.codecombat.com/u/jabari26)\
**Post date:** [March 25, 2019, 4:14am UTC](https://discourse.codecombat.com/t/always-ran-out-of-time-on-backwoods-standoff-a-solved/17976/5 "2019-03-25T04:14:26Z")

</div>

It worked when I hit submit but not while running it before submitting it. Thank you for the help!
