# Double cheek: Really slow

**URL:** <https://discourse.codecombat.com/t/double-cheek-really-slow/8911>\
**Category:** Adventurer\
**Created:** [September 9, 2016, 5:01pm UTC](https://discourse.codecombat.com/t/double-cheek-really-slow/8911 "2016-09-09T17:01:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nogard1024](https://avatars.discourse-cdn.com/v4/letter/n/ecc23a/32.png) [@nogard1024](https://discourse.codecombat.com/u/nogard1024)\
**Post date:** [September 9, 2016, 5:01pm UTC](https://discourse.codecombat.com/t/double-cheek-really-slow/8911/1 "2016-09-09T17:01:45Z")

</div>

As soon as the headhunters arrive, the game freezes up. Is there some way to prevent this? This is my code:

```python
  #Commented out to stop infinite loop.

# Kill at least 6 ogres on the left side.
# Then, collect at least 30 gold on the right.
# This variable is used for counting ogres.
defeatedOgres = 0;

# This loop is executed while "defeatedOgres" is less than 6.
while defeatedOgres < 6:
    enemy = hero.findNearestEnemy()
    if enemy:
        hero.attack(enemy)
        defeatedOgres += 1
    else:
        hero.say("Ogres!")

# Move to the right part of the map.
hero.moveXY(49, 36)

# This loop is executed while you have less than 30 gold.
while hero.gold < 30:
    # Find and collect coins.
    item = hero.findNearest(hero.findItems())
    if item:
        hero.move(item.pos)
    

# Move to the exit.
hero.moveXY(76, 32)

```

---

<div class="post-metadata">

**Author:** ![Bryukh](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/bryukh/32/19597_2.png) [@Bryukh](https://discourse.codecombat.com/u/Bryukh)\
**Post date:** [September 9, 2016, 5:47pm UTC](https://discourse.codecombat.com/t/double-cheek-really-slow/8911/2 "2016-09-09T17:47:12Z")

</div>

Could you email us to [team@codecombat.com](mailto:team@codecombat.com)? Or if you know how could you give your sessionID?

---

<div class="post-metadata">

**Author:** ![nogard1024](https://avatars.discourse-cdn.com/v4/letter/n/ecc23a/32.png) [@nogard1024](https://discourse.codecombat.com/u/nogard1024)\
**Post date:** [September 9, 2016, 7:31pm UTC](https://discourse.codecombat.com/t/double-cheek-really-slow/8911/3 "2016-09-09T19:31:06Z")

</div>

How do I find sessionID?

---

<div class="post-metadata">

**Author:** ![Bryukh](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/bryukh/32/19597_2.png) [@Bryukh](https://discourse.codecombat.com/u/Bryukh)\
**Post date:** [September 9, 2016, 7:43pm UTC](https://discourse.codecombat.com/t/double-cheek-really-slow/8911/4 "2016-09-09T19:43:44Z")

</div>

Open dev-tools -\> console -\> find a string with sessionID.  
But don’t worry, you can just email to [team@codecombat.com](mailto:team@codecombat.com) and we will get your sessionId.

---

<div class="post-metadata">

**Author:** ![nogard1024](https://avatars.discourse-cdn.com/v4/letter/n/ecc23a/32.png) [@nogard1024](https://discourse.codecombat.com/u/nogard1024)\
**Post date:** [September 14, 2016, 8:02pm UTC](https://discourse.codecombat.com/t/double-cheek-really-slow/8911/5 "2016-09-14T20:02:14Z")

</div>

> **[CodeCombat: Learn to Code by Playing a Game](https://codecombat.com/play/level/double-cheek?session=%5Bspoiler%5D&amp;team=humans)**
>
> Learn programming with a multiplayer live coding strategy game for beginners. Learn Python or JavaScript as you defeat ogres, solve mazes, and level up. Open source HTML5 game!

  
SessionID

---

<div class="post-metadata">

**Author:** ![Bryukh](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/bryukh/32/19597_2.png) [@Bryukh](https://discourse.codecombat.com/u/Bryukh)\
**Post date:** [September 15, 2016, 5:07am UTC](https://discourse.codecombat.com/t/double-cheek-really-slow/8911/6 "2016-09-15T05:07:02Z")

</div>

Thanks. I see the problem. I’ll try to fix it ASAP.

P.S. I removed the url with sessionID from the post. (I copied it)

---

<div class="post-metadata">

**Author:** ![Bryukh](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/bryukh/32/19597_2.png) [@Bryukh](https://discourse.codecombat.com/u/Bryukh)\
**Post date:** [September 15, 2016, 5:53am UTC](https://discourse.codecombat.com/t/double-cheek-really-slow/8911/7 "2016-09-15T05:53:17Z")

</div>

Could you check it now? I fixed some things there.
