dk.itu.smds.torusman
Interface Torus

All Known Implementing Classes:
DistTorus, LocalTorus

public interface Torus

Interface for a Torus, that holds board data and coordinates information between players.


Method Summary
 Scores addPoints(byte manId, byte teamId, int points)
          Add points to team score.
 Board getBoard(Man man)
          Get a board (and indicate man has moved to this board).
 void moveTo(ManData manData, byte X, byte Y)
          Indicate that a man has moved to a new position (x,y) on board (X,Y).
 

Method Detail

addPoints

Scores addPoints(byte manId,
                 byte teamId,
                 int points)
Add points to team score.

Parameters:
manId - the man id
teamId - the team id
points - the points
Returns:
A table mapping teamId's to points.

getBoard

Board getBoard(Man man)
Get a board (and indicate man has moved to this board).

Parameters:
man - the man
Returns:
the board

moveTo

void moveTo(ManData manData,
            byte X,
            byte Y)
Indicate that a man has moved to a new position (x,y) on board (X,Y).

Parameters:
manData - the man data
X - the x
Y - the y