Class Torus

java.lang.Object
application.model.simulation.bounds.BoundedGrid
application.model.simulation.bounds.Torus

public class Torus
extends BoundedGrid
Implements a toroidal grid TODO (Offsets such as T300+10,30)
  • Constructor Details

    • Torus

      public Torus()
    • Torus

      public Torus​(java.lang.String specifier, Coordinate initialCoordinate)
      Constructs a toroidal grid
      Parameters:
      specifier - The specifier for the toroidal grid
      initialCoordinate - The initial coordinate for the torus
  • Method Details

    • parse

      public void parse​(java.lang.String string)
      Parses the identifier string for the toroidal grid
      Specified by:
      parse in class BoundedGrid
      Parameters:
      string - The string to parse
    • canonise

      public java.lang.String canonise()
      Canonises the specifier string of the toroidal grid
      Specified by:
      canonise in class BoundedGrid
      Returns:
      Returns the canonised string
    • getRegex

      public java.lang.String[] getRegex()
      Description copied from class: BoundedGrid
      Gets the regex for the identifier string of the bounded grid
      Specified by:
      getRegex in class BoundedGrid
      Returns:
      Returns the regexes for identifying the bounded grid
    • map

      public Coordinate map​(Coordinate coordinate)
      Description copied from class: BoundedGrid
      Maps a coordinate to its new position
      Specified by:
      map in class BoundedGrid
      Parameters:
      coordinate - The coordinate to map
      Returns:
      Returns the new mapped coordinate
    • clone

      public java.lang.Object clone()
      Specified by:
      clone in class BoundedGrid