dk.itu.smds.torusman
Class LocalTorus

java.lang.Object
  extended by dk.itu.smds.torusman.LocalTorus
All Implemented Interfaces:
Torus
Direct Known Subclasses:
DistTorus

public class LocalTorus
extends java.lang.Object
implements Torus

The Class LocalTorus.


Constructor Summary
LocalTorus(byte[][][][] grid)
          Constructor.
 
Method Summary
 Scores addPoints(byte manId, byte teamId, int points)
          Add points to team score.
 Board getBoard(Man man)
          (non-Javadoc)
 void moveTo(ManData manData, byte X, byte Y)
          (non-Javadoc)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalTorus

public LocalTorus(byte[][][][] grid)
Constructor.

Parameters:
grid - Initial grid data. grid[X][Y][y][x] holds data for position (x,y) in the board located at (X,Y). Note that all boards must have the same dimensions, and that each column of boards must have the same height.
Method Detail

addPoints

public Scores addPoints(byte manId,
                        byte teamId,
                        int points)
Description copied from interface: Torus
Add points to team score.

Specified by:
addPoints in interface Torus
Parameters:
manId - the man id
teamId - the team id
points - the points
Returns:
A table mapping teamId's to points.

getBoard

public Board getBoard(Man man)
(non-Javadoc)

Specified by:
getBoard in interface Torus
Parameters:
man - the man
Returns:
the board
See Also:
Torus.getBoard(dk.itu.smds.torusman.Man)

moveTo

public void moveTo(ManData manData,
                   byte X,
                   byte Y)
(non-Javadoc)

Specified by:
moveTo in interface Torus
Parameters:
manData - the man data
X - the x
Y - the y
See Also:
Torus.moveTo(dk.itu.smds.torusman.ManData, byte, byte)