Advanced Strategic Command
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SearchFields Class Referenceabstract

searches fields in hexagonal "circles" around a field and calls testfield for each field More...

#include <mapalgorithms.h>

Inheritance diagram for SearchFields:
Inheritance graph
[legend]

Public Member Functions

 SearchFields (GameMap *_gamemap)
 
void initsearch (const MapCoordinate &startPosition, int _firstDistance, int _lastDistance)
 
virtual void startsearch (void)
 
virtual ~SearchFields ()
 

Protected Member Functions

virtual void testfield (const MapCoordinate &pos)=0
 

Protected Attributes

GameMapgamemap
 
MapCoordinate startPos
 
bool cancelSearch
 
int firstDistance
 
int lastDistance
 
int dist
 

Detailed Description

searches fields in hexagonal "circles" around a field and calls testfield for each field

Definition at line 28 of file mapalgorithms.h.

Constructor & Destructor Documentation

SearchFields::SearchFields ( GameMap _gamemap)

Definition at line 211 of file mapalgorithms.cpp.

References cancelSearch, and gamemap.

virtual SearchFields::~SearchFields ( )
inlinevirtual

Definition at line 40 of file mapalgorithms.h.

Member Function Documentation

void SearchFields::initsearch ( const MapCoordinate startPosition,
int  _firstDistance,
int  _lastDistance 
)
void SearchFields::startsearch ( void  )
virtual
virtual void SearchFields::testfield ( const MapCoordinate pos)
protectedpure virtual

Member Data Documentation

bool SearchFields::cancelSearch
protected
int SearchFields::dist
protected
int SearchFields::firstDistance
protected

Definition at line 33 of file mapalgorithms.h.

Referenced by initsearch(), and startsearch().

GameMap* SearchFields::gamemap
protected
int SearchFields::lastDistance
protected

Definition at line 33 of file mapalgorithms.h.

Referenced by initsearch(), and startsearch().

MapCoordinate SearchFields::startPos
protected

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