summaryrefslogtreecommitdiff
path: root/src/role.offender.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/role.offender.js')
-rw-r--r--src/role.offender.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/role.offender.js b/src/role.offender.js
index fc5196d..91d131e 100644
--- a/src/role.offender.js
+++ b/src/role.offender.js
@@ -1,9 +1,11 @@
+const util = require('creep');
+
module.exports = {
run: (creep) => {
const hostiles = creep.room.find(FIND_HOSTILE_CREEPS);
if (hostiles.length > 0) {
if (creep.attack(hostiles[0]) == ERR_NOT_IN_RANGE) {
- move(creep, hostiles[0]);
+ util.move(creep, hostiles[0]);
}
}
}