Item programming

item is a class for programming in Codecombat.

item object aka class instance may be obtain using the hero class method findNearestItem.

The item class has the following properties: Item can be picked up by the hero simply by moving to the same position as the item, in a single instruction by using the hero class method moveXY, or in multiple steps by using the moveRight/Up/Left/Down methods until the hero and item positions match.
 * type, a string, which value may be for instance "coin" or "gem"
 * value, an integer
 * pos, a complex type or class. pos has two properties x and y of type integer