// This is an example code to help you get started.
// First challenge: create a function to calculate distances
// so that you move towards and pew only the closest cats.
// ======================================================
// Learn more details in the Documentation/How to play.
for (let cat of my_cats) {
if (cat.sight.enemies.length == 0) continue;
let enemy = cats[cat.sight.enemies[0]];
cat.move(enemy.position);
cat.pew(enemy);
}