|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.itu.smds.torusman.LocalMan
public class LocalMan
Nested Class Summary | |
---|---|
class |
LocalMan.Other
Structure to hold other's position and data freshness. |
Field Summary | |
---|---|
int |
key_down
|
int |
key_left
|
int |
key_right
|
int |
key_up
|
ManData |
manData
Man and team ID, and position and direction within the board. |
java.util.Hashtable |
otherMen
A table |
Scores |
scores
A table |
int |
time
The LocalMan's notion of time. |
Constructor Summary | |
---|---|
LocalMan()
Nullary constructor, used only for deserialization. |
|
LocalMan(byte manId,
byte teamId,
int key_up,
int key_down,
int key_left,
int key_right)
|
Method Summary | |
---|---|
void |
deserialize(java.io.DataInputStream in)
Deserialize this man from a stream. |
byte |
getManId()
The id of the man. |
byte |
getX()
X coordinate of current board that the man is on. |
byte |
getY()
Y coordinate of current board that the man is on. |
void |
movedTo(ManData manData)
Callback handle to be invoked when a man has moved to a new position. |
void |
serialize(java.io.DataOutputStream out)
Serialize this man to a stream. |
void |
updatePoints(Scores scores)
Callback handle to be invoked when scores have been updated. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public ManData manData
public int time
public java.util.Hashtable otherMen
public Scores scores
public int key_up
public int key_down
public int key_left
public int key_right
Constructor Detail |
---|
public LocalMan(byte manId, byte teamId, int key_up, int key_down, int key_left, int key_right)
public LocalMan()
Method Detail |
---|
public byte getManId()
Man
getManId
in interface Man
public byte getX()
Man
getX
in interface Man
public byte getY()
Man
getY
in interface Man
public void movedTo(ManData manData)
Man
movedTo
in interface Man
public void updatePoints(Scores scores)
Man
updatePoints
in interface Man
scores
- Tablepublic void serialize(java.io.DataOutputStream out) throws java.io.IOException
Man
serialize
in interface Man
java.io.IOException
public void deserialize(java.io.DataInputStream in) throws java.io.IOException
Man
deserialize
in interface Man
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |