alcoranpaul / DunGen

Procedural Dungeon Generator made for Flax Engine
MIT License
0 stars 0 forks source link

Convert tentativeGCost variable into using delegate function #22

Open alcoranpaul opened 2 days ago

alcoranpaul commented 2 days ago
// Cost from the start node to the current node
// WhatIf: Convert this into a delegate
int tentativeGCost = currentNode.GCost + CalculateDistance(currentNode.GridPosition, neighbor.GridPosition);
if (currentNode.NodeType == NodeType.Hallway)
{
    tentativeGCost = -5;
}

// Cost from the start node to the current node