From cde9c6da1333be971d5279b2c4e9ec7b20246971 Mon Sep 17 00:00:00 2001 From: montylab Date: Thu, 12 Dec 2019 18:06:12 +0300 Subject: [PATCH] Mispelling constant Tile.WALL => Tile.Wall --- clients/javascript/my-strategy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clients/javascript/my-strategy.js b/clients/javascript/my-strategy.js index 6d8ed57..c7f2b1f 100644 --- a/clients/javascript/my-strategy.js +++ b/clients/javascript/my-strategy.js @@ -55,11 +55,11 @@ class MyStrategy { } let jump = targetPos.y > unit.position.y; - if (targetPos.x > unit.position.x && game.level.tiles[parseInt(unit.position.x + 1)][parseInt(unit.position.y)] === Tile.WALL) { + if (targetPos.x > unit.position.x && game.level.tiles[parseInt(unit.position.x + 1)][parseInt(unit.position.y)] === Tile.Wall) { jump = true; } - if (targetPos.x < unit.position.x && game.level.tiles[parseInt(unit.position.x - 1)][parseInt(unit.position.y)] === Tile.WALL) { + if (targetPos.x < unit.position.x && game.level.tiles[parseInt(unit.position.x - 1)][parseInt(unit.position.y)] === Tile.Wall) { jump = true; }