Class CandidateMoves

  • Direct Known Subclasses:
    TicTacToeCandidateMoves

    public class CandidateMoves
    extends java.lang.Object
    Representation of the candidate next moves on a GoMoku Game Board. Immutable after construction.
    • Constructor Detail

      • CandidateMoves

        public CandidateMoves​(GoMokuBoard board)
        Constructor
        Parameters:
        board - the gomoku board to determine candidate moves for
      • CandidateMoves

        protected CandidateMoves()
        For internal use only
    • Method Detail

      • isCandidateMove

        public boolean isCandidateMove​(int row,
                                       int col)
        We consider only those spaces bordering on non-empty spaces. In theory all empties should be considered, but in practice only those bordering existing moves are likely to be favorable.
        Returns:
        true if this position is a possible next move
      • determineCandidateMoves

        protected void determineCandidateMoves​(GoMokuBoard board)
        This method splats a footprint of trues around the current moves. later we look for empty spots that are true for candidate moves.