Class MovePathLegalityFilter

java.lang.Object
megamek.common.pathfinder.filters.Filter<MovePath>
megamek.common.pathfinder.filters.MovePathLegalityFilter

public class MovePathLegalityFilter extends Filter<MovePath>
Filters edges that are illegal.

Current implementation uses MoveStep.isMovementPossible() to verify legality.

  • Constructor Details

    • MovePathLegalityFilter

      public MovePathLegalityFilter(Game game)
  • Method Details

    • shouldStay

      public boolean shouldStay(MovePath edge)
      Description copied from class: Filter
      Tests if the object should stay in the collection.
      Specified by:
      shouldStay in class Filter<MovePath>
      Parameters:
      edge - tested object
      Returns:
      true if the object should stay in the collection