From 449e4e9df08162b1e7e04ac0d4e05a1387298171 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期二, 08 七月 2025 16:48:16 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/common/utils/NavigateSolution.java | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/main/java/com/zy/common/utils/NavigateSolution.java b/src/main/java/com/zy/common/utils/NavigateSolution.java
index 0c632b9..1967be1 100644
--- a/src/main/java/com/zy/common/utils/NavigateSolution.java
+++ b/src/main/java/com/zy/common/utils/NavigateSolution.java
@@ -149,7 +149,7 @@
ConfigService configService = SpringUtils.getBean(ConfigService.class);
if (configService != null) {
Config config = configService.selectOne(new EntityWrapper<Config>()
- .eq("config", "direction_map")
+ .eq("code", "direction_map")
.eq("status", 1));
if (config != null) {
mapDirection = config.getValue();
@@ -195,11 +195,13 @@
if (is_valid(x + 1, y))
{
NavigateNode node = new NavigateNode(x + 1, y);
+ node.setNodeValue(map[x + 1][y]);
neighbour_node.add(node);
}
if (is_valid(x - 1, y))
{
- NavigateNode node = new NavigateNode(x -1, y);
+ NavigateNode node = new NavigateNode(x - 1, y);
+ node.setNodeValue(map[x - 1][y]);
neighbour_node.add(node);
}
}
@@ -209,11 +211,13 @@
if (is_valid(x, y + 1))
{
NavigateNode node = new NavigateNode(x, y + 1);
+ node.setNodeValue(map[x][y + 1]);
neighbour_node.add(node);
}
if (is_valid(x, y - 1))
{
NavigateNode node = new NavigateNode(x, y - 1);
+ node.setNodeValue(map[x][y - 1]);
neighbour_node.add(node);
}
}
@@ -223,11 +227,13 @@
if (is_valid(x, y + 1))
{
NavigateNode node = new NavigateNode(x, y + 1);
+ node.setNodeValue(map[x][y + 1]);
neighbour_node.add(node);
}
if (is_valid(x, y - 1))
{
NavigateNode node = new NavigateNode(x, y - 1);
+ node.setNodeValue(map[x][y - 1]);
neighbour_node.add(node);
}
}
@@ -237,11 +243,13 @@
if (is_valid(x + 1, y))
{
NavigateNode node = new NavigateNode(x + 1, y);
+ node.setNodeValue(map[x + 1][y]);
neighbour_node.add(node);
}
if (is_valid(x - 1, y))
{
- NavigateNode node = new NavigateNode(x -1, y);
+ NavigateNode node = new NavigateNode(x - 1, y);
+ node.setNodeValue(map[x - 1][y]);
neighbour_node.add(node);
}
}
--
Gitblit v1.9.1