Class SmartPlaceIrrigation

All Implemented Interfaces:
Bot, Serializable, Cloneable, Map<Action,Double>

public class SmartPlaceIrrigation extends PriorityBot
See Also:
  • Field Details

  • Constructor Details

    • SmartPlaceIrrigation

      public SmartPlaceIrrigation()
  • Method Details

    • fillAction

      protected void fillAction(Board board, BotState botState, History history)
      Specified by:
      fillAction in class PriorityBot
    • equals

      public boolean equals(Object o)
      Specified by:
      equals in interface Map<Action,Double>
      Overrides:
      equals in class PriorityBot
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface Map<Action,Double>
      Overrides:
      hashCode in class PriorityBot
    • analyzeIrrigationToPlaceToCompletePatternObjective

      public void analyzeIrrigationToPlaceToCompletePatternObjective(Board board, BotState botState)
      This method will add the edge position to the irrigationToPlace list so that the bot knows that he has to place them in order to complete is pattern objectiv
      Parameters:
      board - the board
      botState - the bot state
    • allPatternObjectivesAreCompleted

      public boolean allPatternObjectivesAreCompleted(BotState botState)
      Check if any of the pattern objectives are completed
      Parameters:
      botState - the bot state
      Returns:
      true if there is at least a pattern objective completed, false otherwise
    • getCandidateShapes

      public List<List<Shape>> getCandidateShapes(Board board, BotState botState)
      Get all the shape matching the patterns on the current pattern objectives
      Parameters:
      board - the board
      botState - the bot state
      Returns:
      the list of shapes matching the pattern objectives
    • getCurrentPatternObjectives

      public List<PatternObjective> getCurrentPatternObjectives(BotState botState)