dk.itu.smds.torusman
Class ManData

java.lang.Object
  extended by dk.itu.smds.torusman.ManData

public class ManData
extends java.lang.Object

Data structure for holding information on a man's current position and direction.


Field Summary
 byte manId
           
 byte teamId
           
 byte x
          Current x coordinate within the board.
 byte xdir
          Current horizontal direction (-1/0/1).
 byte y
          Current y coordinate within the board.
 byte ydir
          Current vertical direction (-1/0/1).
 
Constructor Summary
ManData()
          Nullary constructor, only used for deserialization.
ManData(byte manId, byte teamId, byte x, byte y, byte xdir, byte ydir)
          Constructor.
 
Method Summary
 void deserialize(java.io.DataInputStream in)
          Deserialize this object from a stream.
 void serialize(java.io.DataOutputStream out)
          Serialize this object to a stream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

manId

public byte manId

teamId

public byte teamId

x

public byte x
Current x coordinate within the board.


y

public byte y
Current y coordinate within the board.


xdir

public byte xdir
Current horizontal direction (-1/0/1).


ydir

public byte ydir
Current vertical direction (-1/0/1).

Constructor Detail

ManData

public ManData(byte manId,
               byte teamId,
               byte x,
               byte y,
               byte xdir,
               byte ydir)
Constructor.


ManData

public ManData()
Nullary constructor, only used for deserialization.

Method Detail

serialize

public void serialize(java.io.DataOutputStream out)
               throws java.io.IOException
Serialize this object to a stream.

Throws:
java.io.IOException

deserialize

public void deserialize(java.io.DataInputStream in)
                 throws java.io.IOException
Deserialize this object from a stream.

Throws:
java.io.IOException