Class games.Battle.shared.comm.TerrainInit
All Packages Class Hierarchy This Package Previous Next Index
Class games.Battle.shared.comm.TerrainInit
java.lang.Object
|
+----games.Battle.shared.comm.BattlePacket
|
+----games.Battle.shared.comm.TerrainInit
- public class TerrainInit
- extends BattlePacket
The TerrainInit packet is sent to each client prior to the
start of each game, and represents the terrain of the entire
game board. This is somewhat unfortunate, since this means
a rewritten client could take advantage of this information
and always make the terrain visible. However, I have yet
to be convinced that sending terrain information in every
game turn is a good idea.
-
TerrainInit(Board)
- Builds a terrain initializer for a particular board.
-
fromBytes(byte[])
- Fill a board with the terrain initialization data in the buffer.
-
toBytes()
- Produce an array of bytes representing a terrain init
TerrainInit
public TerrainInit(Board board)
- Builds a terrain initializer for a particular board.
- Parameters:
- board - the game board from which the init data will be read/written
toBytes
public byte[] toBytes()
- Produce an array of bytes representing a terrain init
- Overrides:
- toBytes in class BattlePacket
fromBytes
public void fromBytes(byte buffer[])
- Fill a board with the terrain initialization data in the buffer.
- Parameters:
- buffer - the terrain initialization data
- Overrides:
- fromBytes in class BattlePacket
All Packages Class Hierarchy This Package Previous Next Index