Roguelike
 All Classes Namespaces Functions Variables Typedefs Friends Pages
Public Member Functions | Public Attributes | List of all members
ATile Struct Reference

#include <enemy.h>

Public Member Functions

 ATile ()
 
 ATile (int _parent, IntPoint _coords)
 

Public Attributes

int parent
 
IntPoint coords
 
int f
 
int g
 
int h
 

Detailed Description

A rather odd way of handling linked lists. This is only really used in the A-star algorithm, and is designed to act as a linked list by accessing on index instead of by memory address.

See also
Enemy::a_star(IntPoint start, IntPoint goal, TilePointerMatrix& surroundings)

Constructor & Destructor Documentation

ATile::ATile ( )
inline

Default constructor.

ATile::ATile ( int  _parent,
IntPoint  _coords 
)
inline

The constructor

Member Data Documentation

IntPoint ATile::coords

The coordinates of the tile.

int ATile::f

The total "score" for this tile. Made up of f + g

int ATile::g

The distance that has passed from the origin to this tile.

int ATile::h

The result of the Manhattan Heuristic

See also
Enemy::manhattan(IntPoint current, IntPoint goal)
int ATile::parent

The index value of the parent of this tile


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