 					position.y >= 0 && position.y < levelSize.y
 			}
 
+			function stepForward (position) {
+				const increment = [
+					{ x:  0, y: -1 },
+					{ x: -1, y:  0 },
+					{ x:  0, y:  1 },
+					{ x:  1, y:  0 },
+				][position.direction]
+
+				return {
+					x: position.x + increment.x,
+					y: position.y + increment.y,
+				}
+			}
+
 			function getTerrainItem (position) {
 				const { player, levels } = state
 				const level = state.levels[player.position.level]

					entry.count += count
				} else {
					items.push({ name, count })
				}
			}


		if rule.outTerrainItemName?
			push "setTerrainItem(position, #{resolveItem rule.outTerrainItemName})"

		if rule.give?
			rule.give.forEach ({ itemName, quantity }) ->
				push "addInventoryItem(#{resolveItem itemName}, #{quantity})"
				return

