Class Catalyst

All Implemented Interfaces:
java.lang.Iterable<Block>, java.util.Iterator<Block>

public class Catalyst
extends Pattern
Represents a catalyst
  • Constructor Details

    • Catalyst

      public Catalyst​(Rule rule, Grid pattern, int repeatTime)
      Contructs a catalyst
      Parameters:
      rule - The rule the catalyst operates in
      pattern - The catalyst's pattern
      repeatTime - The catalyst's repeat time
  • Method Details

    • toString

      public java.lang.String toString()
      Specified by:
      toString in class Pattern
    • additionalInfo

      public java.util.Map<java.lang.String,​java.lang.String> additionalInfo()
      Specified by:
      additionalInfo in class Pattern
    • equals

      public boolean equals​(java.lang.Object o)
      Description copied from class: Grid
      Check if the inputted grid is equal to this grid (independent of translation)
      Overrides:
      equals in class Grid
      Parameters:
      o - The other grid
      Returns:
      Returns true if the grids are equal, false if they aren't
    • hashCode

      public int hashCode()
      Description copied from class: Grid
      Gets the hash of the grid.
      Overrides:
      hashCode in class Grid
      Returns:
      Returns the grid's hash (uses Golly's hash algorithm).