Package edu.wisc.game.engine

## Class RuleSet.Atom

- java.lang.Object
- - edu.wisc.game.engine.RuleSet.Atom

- Enclosing class:
    RuleSet

      public static class RuleSet.Atom
      extends Object

  Syntax:(counter,shape,color,position,bucketFunctions)

  Example: (10,square,*,*,[1,2]) (10,*,blue,10,[2,3])

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `RuleSet.BucketList` | `bucketList` |
    `Piece.Color[]` | `colors` | For shape-and-color pieces, determines acceptable colors.
    `int` | `counter` | -1 means "no limit"
    `RuleSet.PositionList` | `plist` |
    `Piece.Shape[]` | `shapes` | For shape-and-color pieces, determines acceptable shapes.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `acceptsColorShapeAndProperties​(Piece p)` | Does this atom accept a specified piece, based on its shape and color?
    `String` | `toSrc()` | Format as the source code of the rules set
    `String` | `toString()` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### counter

          public final int counter

      -1 means "no limit"

    - #### shapes

          public final Piece.Shape[] shapes

      For shape-and-color pieces, determines acceptable shapes. Null means "no restriction"

    - #### colors

          public Piece.Color[] colors

      For shape-and-color pieces, determines acceptable colors. Null means "no restriction"

    - #### plist

          public RuleSet.PositionList plist

    - #### bucketList

          public RuleSet.BucketList bucketList

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### toSrc

          public String toSrc()

      Format as the source code of the rules set

    - #### acceptsColorShapeAndProperties

          public boolean acceptsColorShapeAndProperties​(Piece p)

      Does this atom accept a specified piece, based on its shape and color?