From 698717265b657e619d47e1208e95bdf8684f4c98 Mon Sep 17 00:00:00 2001 From: Gatto <132117105+YogaindoCR@users.noreply.github.com> Date: Tue, 31 Dec 2024 14:31:20 +0700 Subject: [PATCH] Update astarpathfind.js Cleaner Code --- extensions/YogaindoCR/astarpathfind.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/extensions/YogaindoCR/astarpathfind.js b/extensions/YogaindoCR/astarpathfind.js index d1f3b59b04..4c20972c2d 100644 --- a/extensions/YogaindoCR/astarpathfind.js +++ b/extensions/YogaindoCR/astarpathfind.js @@ -21,11 +21,11 @@ const menuIconURI = class AStarExtension { getInfo() { return { - id: 'astarpathfind', - name: 'A* Pathfinder', - color1: "#43d3dd", - color2: "#2b5a68", - menuIconURI, + id: 'astarpathfind', + name: 'A* Pathfinder', + color1: "#43d3dd", + color2: "#2b5a68", + menuIconURI, blocks: [ { opcode: 'findPath', @@ -124,7 +124,7 @@ class AStarExtension { const current = openSet.shift(); if (current.node.x === end2D.x && current.node.y === end2D.y) { - return current.path.map(coord => this.coordsToIndex(coord, gridSize)).concat(end).join(" "); + return current.path.map(coord => this.coordsToIndex(coord, gridSize)).concat(end).join(" "); } closedSet.add(this.coordsToIndex(current.node, gridSize));