The Final Kithmaze help

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.

6 Likes

This is also in Python

4 Likes

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 Likes

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

4 Likes

lol
guards kiled themselfs off w spikes

4 Likes

NEED HELP WITH FINAL KITHMAZE. Been stuck for a week

4 Likes

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.

4 Likes

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()
4 Likes

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

4 Likes

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.
    
}
4 Likes

This still does not work

3 Likes

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

2 Likes

Thanks!! Good job :slight_smile:

2 Likes

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

2 Likes

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.

3 Likes

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

2 Likes

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!

3 Likes

In Javascript that’s a valid operator.

2 Likes

Oh ok :blush: :blush:

2 Likes

Currently I have this issue while doing the Python version of CodeCombat and can’t get past the level. It says that i’m not using level than 10 statements in my code.

Here’s a picture: http://puu.sh/lQ7XM/74698bf15b.png

1 Like