수정중
This commit is contained in:
Binary file not shown.
@@ -127,6 +127,9 @@ namespace AStarPathFinding
|
|||||||
switch(tableStateData[i, j])
|
switch(tableStateData[i, j])
|
||||||
{
|
{
|
||||||
case eTileState.Start:
|
case eTileState.Start:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
case eTileState.Goal:
|
case eTileState.Goal:
|
||||||
case eTileState.Wall:
|
case eTileState.Wall:
|
||||||
case eTileState.Road:
|
case eTileState.Road:
|
||||||
@@ -330,33 +333,33 @@ namespace AStarPathFinding
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tableStateData[tempChildAxis.X, tempChildAxis.Y] == eTileState.RRoad & Form1.Direction == "Left")
|
//if (tableStateData[tempChildAxis.X, tempChildAxis.Y] == eTileState.RRoad & Form1.Direction == "Left")
|
||||||
{
|
//{
|
||||||
openNode = tableNodeData[tempChildAxis.X, tempChildAxis.Y];
|
// openNode = tableNodeData[tempChildAxis.X, tempChildAxis.Y];
|
||||||
openNode.SetParent(focusNode);
|
// openNode.SetParent(focusNode);
|
||||||
openNode.SetGCost(gCost + openNode.parent.R);
|
// openNode.SetGCost(gCost + openNode.parent.R);
|
||||||
openNode.SetHCost(openNode.parent.R + 1000);
|
// openNode.SetHCost(openNode.parent.R + 1000);
|
||||||
openNode.ParentDirection = neerAxis[i];
|
// openNode.ParentDirection = neerAxis[i];
|
||||||
|
|
||||||
dicOpenList.Add(tempChildAxis, openNode);
|
// dicOpenList.Add(tempChildAxis, openNode);
|
||||||
tableStateData[tempChildAxis.X, tempChildAxis.Y] = eTileState.Open;
|
// tableStateData[tempChildAxis.X, tempChildAxis.Y] = eTileState.Open;
|
||||||
|
|
||||||
continue;
|
// continue;
|
||||||
}
|
//}
|
||||||
|
|
||||||
if (tableStateData[tempChildAxis.X, tempChildAxis.Y] == eTileState.LRoad & Form1.Direction == "Right")
|
//if (tableStateData[tempChildAxis.X, tempChildAxis.Y] == eTileState.LRoad & Form1.Direction == "Right")
|
||||||
{
|
//{
|
||||||
openNode = tableNodeData[tempChildAxis.X, tempChildAxis.Y];
|
// openNode = tableNodeData[tempChildAxis.X, tempChildAxis.Y];
|
||||||
openNode.SetParent(focusNode);
|
// openNode.SetParent(focusNode);
|
||||||
openNode.SetGCost(gCost + openNode.parent.L);
|
// openNode.SetGCost(gCost + openNode.parent.L);
|
||||||
openNode.SetHCost(openNode.parent.L + 1000); // 휴리스틱 값 수정해서 길 따라갈 수 있게 점수를 낮춰줌 수정
|
// openNode.SetHCost(openNode.parent.L + 1000); // 휴리스틱 값 수정해서 길 따라갈 수 있게 점수를 낮춰줌 수정
|
||||||
openNode.ParentDirection = neerAxis[i];
|
// openNode.ParentDirection = neerAxis[i];
|
||||||
|
|
||||||
dicOpenList.Add(tempChildAxis, openNode);
|
// dicOpenList.Add(tempChildAxis, openNode);
|
||||||
tableStateData[tempChildAxis.X, tempChildAxis.Y] = eTileState.Open;
|
// tableStateData[tempChildAxis.X, tempChildAxis.Y] = eTileState.Open;
|
||||||
|
|
||||||
continue;
|
// continue;
|
||||||
}
|
//}
|
||||||
|
|
||||||
if (tableStateData[tempChildAxis.X, tempChildAxis.Y] == eTileState.LRoad & Form1.Direction == "Left")
|
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.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user