|
|||||||||
| 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 holds all information about a torus used in the mobile version of the Torus game.
| Field Summary | |
|---|---|
java.io.DataInputStream |
in
The in. |
BTListener |
listener
The listener. |
LocalMan |
myMan
The man. |
java.io.DataOutputStream |
out
The out. |
BTSender |
sender
The sender. |
| Constructor Summary | |
|---|---|
DistTorus(byte[][][][] grid,
LocalMan man)
Instantiates a new dist. torus with a listener for packages and then a sender. |
|
| Method Summary | |
|---|---|
Scores |
addPoints(byte manId,
byte teamId,
int points)
First adds the points of the local torus and then sends the points to all the other players in the game using the bluetooth sender and then returns the score. |
Board |
getBoard(Man man)
Gets the board of the man. |
void |
moveTo(ManData manData,
byte X,
byte Y)
Moves the torus for the local player and send the relevant information to all other players. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public BTSender sender
public BTListener listener
public java.io.DataInputStream in
public java.io.DataOutputStream out
public LocalMan myMan
| Constructor Detail |
|---|
public DistTorus(byte[][][][] grid,
LocalMan man)
grid - the gridman - the man| Method Detail |
|---|
public Scores addPoints(byte manId,
byte teamId,
int points)
addPoints in interface TorusaddPoints in class LocalTorusmanId - the man id of the torusteamId - the team id of the toruspoints - the added 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 - the man data to be sentX - the new positionY - the new 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 | ||||||||