Class games.Battle.server.GeoMorph.GeoTile
All Packages Class Hierarchy This Package Previous Next Index
Class games.Battle.server.GeoMorph.GeoTile
java.lang.Object
|
+----games.Battle.server.GeoMorph.GeoTile
- public class GeoTile
- extends Object
- implements Cloneable
GeoTile implements one particular tile in a geomorph world.
-
EAST
- direction constant: east
-
GEO_TILESIZE
- The number of squares in a particular geomorph tile
-
NORTH
- direction constant: north
-
SOUTH
- direction constant: south
-
WEST
- direction constant: west
-
cityX
- the location of the city hint for this tile (place a city here,
if anywhere!)
-
cityY
- the location of the city hint for this tile (place a city here,
if anywhere!)
-
tile
- the actual terrain in this tile
-
validTiles
- an array of vectors, one for each direction.
-
GeoTile(DataInput, int)
- construct a tile be reading it in from the data input stream.
-
asciiDump()
- produce debugging output for this tile
-
checkCompatibility(GeoTile)
- compare us to the other tile and add the other tile to our legal
neighbour lists in each direction
-
clone()
- return an exact copy of this tile
-
findAllCompatibleTiles(Vector)
- given a vector of tiles set up our own compatibility lists
-
rotate90()
- rotate this tile 90 degrees to create a "new" tile
GEO_TILESIZE
public final static int GEO_TILESIZE
- The number of squares in a particular geomorph tile
NORTH
public final static int NORTH
- direction constant: north
EAST
public final static int EAST
- direction constant: east
SOUTH
public final static int SOUTH
- direction constant: south
WEST
public final static int WEST
- direction constant: west
tile
public int tile[][]
- the actual terrain in this tile
cityX
public int cityX
- the location of the city hint for this tile (place a city here,
if anywhere!)
cityY
public int cityY
- the location of the city hint for this tile (place a city here,
if anywhere!)
validTiles
public Vector validTiles[]
- an array of vectors, one for each direction. Each vector
contains a list of valid tile neighbours in that direction.
validity is determined by comparing the continuity of the
terrain along that edge of the tile to avoid introducing
badly mismatched terrain.
GeoTile
public GeoTile(DataInput data,
int id) throws IOException
- construct a tile be reading it in from the data input stream.
the id given to the tile is assumed to be unique.
- Parameters:
- data - an input stream that contains a tile data file
- id - an id that is assumed to be unique to this tile
rotate90
public void rotate90()
- rotate this tile 90 degrees to create a "new" tile
clone
public Object clone()
- return an exact copy of this tile
- Overrides:
- clone in class Object
checkCompatibility
public boolean checkCompatibility(GeoTile other)
- compare us to the other tile and add the other tile to our legal
neighbour lists in each direction
findAllCompatibleTiles
public void findAllCompatibleTiles(Vector tiles)
- given a vector of tiles set up our own compatibility lists
asciiDump
public void asciiDump()
- produce debugging output for this tile
All Packages Class Hierarchy This Package Previous Next Index