Britbot
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Static Private Member Functions
Britbot.Navigator.Node Class Reference

private class representing each cell of the map More...

+ Inheritance diagram for Britbot.Navigator.Node:
+ Collaboration diagram for Britbot.Navigator.Node:

List of all members.

Public Member Functions

double F ()
 calculates the F function (what we are minimizing)
bool IsPassable ()
 checks if a curtain node is passible, meaning its wight isn't infinity
List< NodeGetNeighbors ()
 returns the neighbors of the Node, meaning the adjacent location wich are not impassible

Static Public Member Functions

static void UpdateMap (Group group)
 This function should be called ONCE PER GROUP in the CalculatePriorities function it updates the map data based on the current game state it sets what areas are passable and what are dangerous.
static void CalculateEnemyWeight (int strength)
 This adds the wight of the enemies wich pose a threat to the specified group size.
static void SetUpCalculation (Location target)
 This function should be called PER TARGET in the Navigator.CalculatePath method it updates the heuristic values based on distance from the target also sets G value to default -1.
static double HuristicFunction (Location loc1, Location loc2)
 this determines the huristic function used for the A* algorithm based on the EuclidianHuristic constant in Node
static Node GetLocationNodeFromMap (Location loc)
 Returns the Node in the map corresponding to the locations specified.
static void DebugPasses ()

Public Attributes

const double Infinity = 100
 this weight represents an impassable cell
double G
 the calculated G function score of the algorithm for this specific node it will be updated during the algorithm
double H
 The heuristic coefficient, it will simply be the euclidean distance.
bool IsEvaluated
 true if G value has been calculated
Location Loc
 The X coordinate of the Node.
double Weight
 the weight of the cell, should be higher near enemies and un-passable places

Static Public Attributes

static Node[,] Map = new Node[Bot.Game.GetRows(), Bot.Game.GetCols()]
 A static array of nodes representing the map.

Static Private Member Functions

static Node ()
 One time initializing of the Node array.
static void BlockLocation (Location loc, double radSquared, HeadingVector heading)
 Creates a gradiante of bad score around a specific location with a given radious.

Detailed Description

private class representing each cell of the map

Definition at line 22 of file Node.cs.


The documentation for this class was generated from the following file: