jtge.util.grid.torus
Class CompleteTorus

java.lang.Object
  extended byjtge.util.grid.torus.CompleteTorus
All Implemented Interfaces:
ITorus

public class CompleteTorus
extends java.lang.Object
implements ITorus

Acts as a torus in both the vertical and horizontal directions.

Version:
$Id: CompleteTorus.java,v 1.4 2005/09/09 17:44:01 mat007 Exp $
Author:
Jean-Laurent Fabre de Morlhon

Constructor Summary
CompleteTorus(int width, int height)
          Create a complete torus.
 
Method Summary
 Coordinate transform(Coordinate coordinate)
          Modifiy the coordinate according to the Torus implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompleteTorus

public CompleteTorus(int width,
                     int height)
Create a complete torus.

Parameters:
width - torus width in tiles
height - torus height in tiles
Method Detail

transform

public final Coordinate transform(Coordinate coordinate)
Modifiy the coordinate according to the Torus implementation.

Specified by:
transform in interface ITorus
Parameters:
coordinate - the coordinate to transform
Returns:
the transformed coordinate


Copyright © 2003-2005 . All Rights Reserved.