Difference between revisions of "Location Functions"

From theFarWilds
Jump to: navigation, search
(Methods)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
[[Category:Scripts]]
 
[[Category:Scripts]]
A location object represents a particular hex on the playing map.  See the [[Coordinate System]] page for more info.
+
A location object represents a particular hex on the playing map.  Note that the TFW [[Coordinate System]] is transposed -- the x-axis is vertical and the y-axis is horizontal.  Labeling starts from zero.
  
 
== Constructors ==
 
== Constructors ==
  Location createLocation( int x, int y );
+
  Location '''createLocation'''( int x, int y );
  
 
== Methods ==
 
== Methods ==
Line 10: Line 10:
 
   
 
   
 
  bool '''isValid'''();
 
  bool '''isValid'''();
 +
 +
int '''distance'''(Location);
 +
 +
int '''getX'''();
 +
int '''getY'''();
 +
 +
Player '''getController'''();

Latest revision as of 14:20, 16 April 2010

A location object represents a particular hex on the playing map. Note that the TFW Coordinate System is transposed -- the x-axis is vertical and the y-axis is horizontal. Labeling starts from zero.

Constructors

Location createLocation( int x, int y );

Methods

bool isAloft(); 
// false if an Aloft guy is grounded after melee

bool isValid();

int distance(Location);

int getX();
int getY();

Player getController();