The Final Kithmaze help


#1

I legit cant figure out how to do this. I have asked others and they don’t know it either. I tried about everything I could think of. This is what I have so far
loop:
self.moveRight()
self.moveUp()
self.findNearestEnemy()
“enemy” = “This”
“enemy” self.attack = ('This")
self.attack(“This”)
I was messing around at the bottom and it’s prob not neeeded but PLEASE help me with this. Thanks.


#2

This is also in Python


#3

This is only the first part, but perhaps it can give you a hint:

loop:
    self.moveRight()
    self.moveUp()
    enemy = self.findNearestEnemy()
    self.attack(enemy)
    self.attack(enemy)
    # Add more movement commands here to finish the level.

Hope this helps!


#4

I typed in the code and it worked! Thx man :slight_smile:


#5

lol
guards kiled themselfs off w spikes


#6

loop:
self.moveRight()
self.moveUp()
enemy = self.findNearestEnemy()
self.attack(enemy)
self.attack(enemy)
self.moveRight()
self.moveDown()
self.moveDown()
self.moveUp()


#7

NEED HELP WITH FINAL KITHMAZE. Been stuck for a week


#8

I’m also stuck here. It says I am successful but never sends me to the next level. I am stuck repeating this level over and over … even when it’s right. I must be missing something.


#9

i have the MAHOGANY GLASSES

loop:
    self.moveRight()
    self.moveUp()
    enemies = self.findEnemies()
    for enemy in enemies:
        self.attack(enemy)
    self.attack(enemy)
    self.attack(enemy)
    self.moveRight()
    self.moveDown()
    self.moveDown()
    self.moveUp()

#10

I have javascript and I can not find a way to pass the level.
I tried every code on this page.
It won’t even let me use “.self”!
Please help


#11

self is Python; in JavaScript, you use this:

loop {
    this.moveRight();
    this.moveUp();
    var enemy = self.findNearestEnemy();
    this.attack(enemy);
    this.attack(enemy);
    // Add more movement commands here to finish the level.
    
}

#12

This still does not work


#13

Well, what did you put in the “// Add more movement commands here to finish the level.” section that doesn’t do what you expect…???..


#14

Thanks!! Good job :slight_smile:


#15

I use Pythic Your using Javascript if it says this.moveup for some reason


#16

I’m having a problem with this level not counting my statements correct (I think).

It tells me that this code is more than 10 statements:

loop {
    this.moveRight();
    this.moveUp();
    while (this.findNearestEnemy() !== null)
        this.attack(this.findNearestEnemy());
    this.moveRight();
    this.moveDown(2);
    this.moveUp();
}

Any hints as to what I’m missing? I’ve tried this using

loop {
    this.moveRight();
    this.moveUp();
    var enemy = this.findNearestEnemy();
    this.attack(enemy);
    this.attack(enemy);
    this.moveRight();
    this.moveDown(2);
    this.moveUp();
}

as well and that gives the same problem with too many statements as well.


#17

It appears that on line 10 you have !== null. Is this intentional?


#18

Hi,

There was a brief time between last night and today where the goals for this level were incorrect. Within the last 4 or so hours, I believe I’ve fixed this issue.

Retry it and see if the problem was fixed.

Sorry!


#19

In Javascript that’s a valid operator.


#20

Oh ok :blush: :blush: