I tried solving “Polygonception” from the Glacier using the technique shown in previous levels, but for some reason I keep getting the error above.
Here’s what I’m doing:
startOffset = Vector(-15, -15) endOffset = Vector(15, -15) enemies = self.findEnemies() for enemy in enemies: start = Vector.add(enemy.pos, startOffset) end = Vector.add(enemy.pos, endOffset) sides = enemy.sides polygon(start, end, sides)
where polygon is defined as follows:
def polygon(start, end, side): full = Vector.subtract(end, start) ......................
At the very first line of polygon the error appers. What am I doing wrong?