jtge.util.grid.torus
Class HorizontalTorus

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

public class HorizontalTorus
extends java.lang.Object
implements ITorus

Acts as a torus in the horizontal direction.

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

Constructor Summary
HorizontalTorus(int width)
          Create a horizontal 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

HorizontalTorus

public HorizontalTorus(int width)
Create a horizontal torus.

Parameters:
width - the width 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.