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.

Variable Index

 o EAST
direction constant: east
 o GEO_TILESIZE
The number of squares in a particular geomorph tile
 o NORTH
direction constant: north
 o SOUTH
direction constant: south
 o WEST
direction constant: west
 o cityX
the location of the city hint for this tile (place a city here, if anywhere!)
 o cityY
the location of the city hint for this tile (place a city here, if anywhere!)
 o tile
the actual terrain in this tile
 o validTiles
an array of vectors, one for each direction.

Constructor Index

 o GeoTile(DataInput, int)
construct a tile be reading it in from the data input stream.

Method Index

 o asciiDump()
produce debugging output for this tile
 o checkCompatibility(GeoTile)
compare us to the other tile and add the other tile to our legal neighbour lists in each direction
 o clone()
return an exact copy of this tile
 o findAllCompatibleTiles(Vector)
given a vector of tiles set up our own compatibility lists
 o rotate90()
rotate this tile 90 degrees to create a "new" tile

Variables

 o GEO_TILESIZE
  public final static int GEO_TILESIZE
The number of squares in a particular geomorph tile
 o NORTH
  public final static int NORTH
direction constant: north
 o EAST
  public final static int EAST
direction constant: east
 o SOUTH
  public final static int SOUTH
direction constant: south
 o WEST
  public final static int WEST
direction constant: west
 o tile
  public int tile[][]
the actual terrain in this tile
 o cityX
  public int cityX
the location of the city hint for this tile (place a city here, if anywhere!)
 o cityY
  public int cityY
the location of the city hint for this tile (place a city here, if anywhere!)
 o 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.

Constructors

 o 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

Methods

 o rotate90
  public void rotate90()
rotate this tile 90 degrees to create a "new" tile
 o clone
  public Object clone()
return an exact copy of this tile
Overrides:
clone in class Object
 o 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
 o findAllCompatibleTiles
  public void findAllCompatibleTiles(Vector tiles)
given a vector of tiles set up our own compatibility lists
 o asciiDump
  public void asciiDump()
produce debugging output for this tile

All Packages  Class Hierarchy  This Package  Previous  Next  Index