// Użyj ognistych pułapek by pokonać ogry atakujące Fabrykę.
while(true) {
var enemy = hero.findNearestEnemy();
if(enemy) {
// If the enemy is to the left of the hero:
if(enemy.pos.x < hero.pos.x) {
// Jeśli przeciwnik znajduje się po lewej, zbuduj ognistą pułapkę po lewej.
hero.buildXY("fire-trap", 25, 34);
// If the enemy is to the right of the hero:
} else if (enemy.pos.x > hero.pos.x) {