Class Centipede.CentiMap

Object
S3Map
CentiMap
All Implemented Interfaces:
BasicTooltipProvider
Enclosing class:
Centipede

public class Centipede.CentiMap extends S3Map
The CentiMap class provides a mapping of the centipede game to a pair of \(S_3\) simplices for the first mover and second mover roles.
  • Constructor Details

    • CentiMap

      public CentiMap(int role)
      Constructs a new CentiMap instance for the given role.
      Parameters:
      role - the role of the player
  • Method Details

    • setNames

      public void setNames(String[] names)
      Description copied from class: S3Map
      Set the names of the traits.
      Overrides:
      setNames in class S3Map
      Parameters:
      names - the names of the traits
    • getColors

      public Color[] getColors()
      Description copied from class: S3Map
      Get the colors of the traits.
      Overrides:
      getColors in class S3Map
      Returns:
      the colors of the traits
    • data2S3

      public Point2D data2S3(double[] data, Point2D p)
      Description copied from class: S3Map
      Convert the data array to cartesian coordinates of point on simplex. The conversion observes the selection and order of traits.

      Notes:

      1. The array s includes the time at s[0] and should not be altered.
      2. The point on simplex is returned in scaled user coordinates in [0,1].
      3. In order to deal with projections onto \(S_3\) subspaces the coordinates do not need to sum up to 1.0.
      Overrides:
      data2S3 in class S3Map
      Parameters:
      data - the data array indicating a point on the simplex
      p - the cartesian coordinates of the point on the simplex
      Returns:
      the point p
      See Also: