packt.java9.by.example.mastermind

## Class Guesser

- java.lang.Object
- - packt.java9.by.example.mastermind.Guesser

- Direct Known Subclasses:
    GeneralGuesser, UniqueGuesser

      public abstract class Guesser
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Color[]` | `lastGuess`
    `static Color[]` | `none`
    `protected Table` | `table`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Guesser(Table table)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Row` | `guess()` Create a new Row object that contains a guess that matches all guesses and the responses to them that are on the table.
    `protected Color[]` | `nextGuess()` get the next guess, without checking any matching
    `protected abstract void` | `setFirstGuess()`

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

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

- - ### Field Detail

    - #### table

          protected final Table table

    - #### lastGuess

          protected final Color[] lastGuess

    - #### none

          public static final Color[] none

  - ### Constructor Detail

    - #### Guesser

          public Guesser(Table table)

  - ### Method Detail

    - #### setFirstGuess

          protected abstract void setFirstGuess()

    - #### nextGuess

          protected Color[] nextGuess()

      get the next guess, without checking any matching
      Returns:
        the next guess

    - #### guess

          public Row guess()

      Create a new Row object that contains a guess that matches all guesses and the responses to them that are on the table.
      Returns:
        the new Row to be added to the table along with the feedback afterwards.