C# Class Universe.BotManager.AStar.AStarNode

Base class for path finding nodes, it holds no actual information about the map. An inherited class must be constructed from this class and all virtual methods must be implemented. Note, that calling base() in the overridden methods is not needed.
Inheritance: IComparable
Show file Open project: Virtual-Universe/Virtual-Universe Class Usage Examples

Public Methods

Method Description
AStarNode ( AStarNode aParent, AStarNode aGoalNode, double aCost ) : System

Constructor.

Calculate ( ) : void

Calculates the estimated cost for the remaining trip to the goal.

CompareTo ( object obj ) : int
Equals ( object obj ) : bool
GetHashCode ( ) : int
GetSuccessors ( ArrayList aSuccessors ) : void

Gets all successors nodes from the current node and adds them to the successor list

IsGoal ( ) : bool

Determines whether the current node is the goal.

IsSameState ( AStarNode aNode ) : bool

Determines whether the current node is the same state as the on passed.

Method Details

AStarNode() public method

Constructor.
public AStarNode ( AStarNode aParent, AStarNode aGoalNode, double aCost ) : System
aParent AStarNode The node's parent
aGoalNode AStarNode The goal node
aCost double The accumulative cost until now
return System

Calculate() public method

Calculates the estimated cost for the remaining trip to the goal.
public Calculate ( ) : void
return void

CompareTo() public method

public CompareTo ( object obj ) : int
obj object
return int

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool

GetHashCode() public method

public GetHashCode ( ) : int
return int

GetSuccessors() public method

Gets all successors nodes from the current node and adds them to the successor list
public GetSuccessors ( ArrayList aSuccessors ) : void
aSuccessors System.Collections.ArrayList List in which the successors will be added
return void

IsGoal() public method

Determines whether the current node is the goal.
public IsGoal ( ) : bool
return bool

IsSameState() public method

Determines whether the current node is the same state as the on passed.
public IsSameState ( AStarNode aNode ) : bool
aNode AStarNode AStarNode to compare the current node to
return bool