|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectdk.itu.smds.torusman.LocalTorus
dk.itu.smds.torusman.DistTorus
public class DistTorus
The Class DistTorus uses the methods of our implementation that lets the game run distributed.
| Field Summary | |
|---|---|
java.io.DataInputStream |
in
The in. |
ClientListener |
listener
The listener. |
LocalMan |
myMan
The my man. |
java.io.DataOutputStream |
out
The out. |
ClientSender |
sender
The sender. |
java.net.Socket |
socket
The socket. |
ClientTimeSender |
timeSender
The time sender. |
| Constructor Summary | |
|---|---|
DistTorus(byte[][][][] grid,
java.lang.String ip,
LocalMan man)
Instantiates a new dist torus. |
|
| Method Summary | |
|---|---|
Scores |
addPoints(byte manId,
byte teamId,
int points)
Adds the points to the local man and then sends it to the server. |
Board |
getBoard(Man man)
Gets the board from the given man. |
void |
moveTo(ManData manData,
byte X,
byte Y)
Moves the local mand and sends the move to the server. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public ClientSender sender
public ClientTimeSender timeSender
public ClientListener listener
public java.io.DataInputStream in
public java.io.DataOutputStream out
public java.net.Socket socket
public LocalMan myMan
| Constructor Detail |
|---|
public DistTorus(byte[][][][] grid,
java.lang.String ip,
LocalMan man)
grid - the gridip - the ipman - the man| Method Detail |
|---|
public Scores addPoints(byte manId,
byte teamId,
int points)
addPoints in interface TorusaddPoints in class LocalTorusmanId - the man idteamId - the team idpoints - the points
LocalTorus.addPoints(byte, byte, int)public Board getBoard(Man man)
getBoard in interface TorusgetBoard in class LocalTorusman - the given man
LocalTorus.getBoard(dk.itu.smds.torusman.Man)
public void moveTo(ManData manData,
byte X,
byte Y)
moveTo in interface TorusmoveTo in class LocalTorusmanData - that man to moveX - the positionY - the positionLocalTorus.moveTo(dk.itu.smds.torusman.ManData, byte, byte)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||