# Diamond Dozen always non optimal

**URL:** <https://discourse.codecombat.com/t/diamond-dozen-always-non-optimal/14554>\
**Category:** Uncategorized\
**Created:** [April 25, 2018, 3:17pm UTC](https://discourse.codecombat.com/t/diamond-dozen-always-non-optimal/14554 "2018-04-25T15:17:24Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![xython](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/xython/32/7269_2.png) [@xython](https://discourse.codecombat.com/u/xython)\
**Post date:** [April 25, 2018, 8:17pm UTC](https://discourse.codecombat.com/t/diamond-dozen-always-non-optimal/14554/5 "2018-04-25T20:17:30Z")

</div>

Your code runs successfully with my equipment after replacing the last row

```python
hero.moveXY(coin.pos.x, coin.pos.y)
                                   with
hero.move(coin.pos)

```

I always replace moveXY with move when possible. MoveXY has a hidden loop inside it and it’s blocking or slowing some actions

---

_[View the full topic](https://discourse.codecombat.com/t/diamond-dozen-always-non-optimal/14554)._
