|
Britbot
|
this class will deal with geographical calculations and direction calculation More...
Classes | |
| class | Node |
| private class representing each cell of the map More... | |
Static Public Member Functions | |
| static Direction | CalculateDirectionToStationeryTarget (Location myLoc, HeadingVector myHeading, Location target) |
| Given your location, you current direction and the target's location, this method calculates the best direction for you to move in order to simulate a straight line of motion to to your target. | |
| static Direction | CalculateDirectionToMovingTarget (Location myLoc, HeadingVector myHeading, Location target, HeadingVector targetHeading) |
| This function calculates the directions to a moving target it does so by solving the intersection point equation as appears in calculation sheet 1 and then using the above CalculateDirectionToStationeryTarget i am very likely to be wrong here. | |
| static double | SolveStupidEquation (double a, double b, double c, double d, double e) |
| This function should solve equation (*) in calculation sheet 2 I am not sure if this works, the solution was annoying as hell, hope i did everything right. | |
| static double | CalcDistFromLine (Location point, Location linePoint, HeadingVector dir) |
| calculates distance (in turns) from ship's trajectory to a given island location (point) uses the calculation in calculation sheet 3 | |
| static int | ComparePirateByDirection (int p1, int p2, HeadingVector hv) |
| Given two pirates (id) it tells you who is "more" in a specific direction than the other. | |
| static bool | IsReachable (Location group, Location target, HeadingVector targetHeading) |
| This method calculates if you would be able to reach an enemy group or it would run away. | |
| static Direction | CalculatePath (Location start, Location target) |
| Calculates first direction in path according to the A* algorithem explanation + the pseudo code used to write this can be found in http://en.wikipedia.org/wiki/A*_search_algorithm. | |
| static void | UpdateMap (Group group) |
| function to update map for specific group simply calls the Node.updateMap function | |
Static Public Attributes | |
| static List< long > | time = new List<long>() |
Static Private Member Functions | |
| static Direction | FindBestDirectionOutOfMap (Node beginning) |
| after the A* algorithm has finished, is simply finds the best neighbor of the beginning node and returns the direction to it | |
this class will deal with geographical calculations and direction calculation
Definition at line 18 of file Navigator.cs.
1.7.6.1