수정중

This commit is contained in:
김민구
2020-12-18 17:42:37 +09:00
parent 7c35e8febd
commit 3c68ea8736
8 changed files with 25 additions and 22 deletions

Binary file not shown.

View File

@@ -127,6 +127,9 @@ namespace AStarPathFinding
switch(tableStateData[i, j])
{
case eTileState.Start:
case eTileState.Goal:
case eTileState.Wall:
case eTileState.Road:
@@ -330,33 +333,33 @@ namespace AStarPathFinding
continue;
}
if (tableStateData[tempChildAxis.X, tempChildAxis.Y] == eTileState.RRoad & Form1.Direction == "Left")
{
openNode = tableNodeData[tempChildAxis.X, tempChildAxis.Y];
openNode.SetParent(focusNode);
openNode.SetGCost(gCost + openNode.parent.R);
openNode.SetHCost(openNode.parent.R + 1000);
openNode.ParentDirection = neerAxis[i];
//if (tableStateData[tempChildAxis.X, tempChildAxis.Y] == eTileState.RRoad & Form1.Direction == "Left")
//{
// openNode = tableNodeData[tempChildAxis.X, tempChildAxis.Y];
// openNode.SetParent(focusNode);
// openNode.SetGCost(gCost + openNode.parent.R);
// openNode.SetHCost(openNode.parent.R + 1000);
// openNode.ParentDirection = neerAxis[i];
dicOpenList.Add(tempChildAxis, openNode);
tableStateData[tempChildAxis.X, tempChildAxis.Y] = eTileState.Open;
// dicOpenList.Add(tempChildAxis, openNode);
// tableStateData[tempChildAxis.X, tempChildAxis.Y] = eTileState.Open;
continue;
}
// continue;
//}
if (tableStateData[tempChildAxis.X, tempChildAxis.Y] == eTileState.LRoad & Form1.Direction == "Right")
{
openNode = tableNodeData[tempChildAxis.X, tempChildAxis.Y];
openNode.SetParent(focusNode);
openNode.SetGCost(gCost + openNode.parent.L);
openNode.SetHCost(openNode.parent.L + 1000); // 휴리스틱 값 수정해서 길 따라갈 수 있게 점수를 낮춰줌 수정
openNode.ParentDirection = neerAxis[i];
//if (tableStateData[tempChildAxis.X, tempChildAxis.Y] == eTileState.LRoad & Form1.Direction == "Right")
//{
// openNode = tableNodeData[tempChildAxis.X, tempChildAxis.Y];
// openNode.SetParent(focusNode);
// openNode.SetGCost(gCost + openNode.parent.L);
// openNode.SetHCost(openNode.parent.L + 1000); // 휴리스틱 값 수정해서 길 따라갈 수 있게 점수를 낮춰줌 수정
// openNode.ParentDirection = neerAxis[i];
dicOpenList.Add(tempChildAxis, openNode);
tableStateData[tempChildAxis.X, tempChildAxis.Y] = eTileState.Open;
// dicOpenList.Add(tempChildAxis, openNode);
// tableStateData[tempChildAxis.X, tempChildAxis.Y] = eTileState.Open;
continue;
}
// continue;
//}
if (tableStateData[tempChildAxis.X, tempChildAxis.Y] == eTileState.LRoad & Form1.Direction == "Left")
{

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.