Storage room filled with treasure, traps, and a quick orc guards.
Brief introduction
Can you escape from the storage room was not the ogre in the case of the guards caught? Follow the trail of coins.
Check the enemy like a 'type', like, you can check the 'item' position or 'pos'. You can even find the x and y coordinates 'item of the pos'.
When you click "Submit" maze changes. Using the location of the item instead of hard-coded coordinates.
The default code
Overview
Your new glasses comes findNearestItem methods that you can use to make your hero to find gold in the vicinity of (gem what can be), but the job was a hero in the field of view.
You can move to a place like this article:
每个物品都是一个 对象 (object),对象是一种数据类型, 就像字符串 或者 数字。对象包含了其他的数据,我们称之为 属性 (property).
每个物品 (以及单元) 对象都有一个 pos 属性,代表它的位置。 而每个 pos 本身也是一个对象,拥有 x 和 y 属性,这些可以用于 moveXY 和 buildXY 。