Class SplitLegion

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

final class SplitLegion extends KDialog
Class SplitLegion allows a player to split a Legion into two Legions.
Author:
David Ripton
  • Field Details

    • oldChits

      private final List<Chit> oldChits
    • newChits

      private final List<Chit> newChits
    • oldMarker

      private final Marker oldMarker
    • newMarker

      private final Marker newMarker
    • gui

      private final ClientGUI gui
    • active

      private static boolean active
    • creaturesToSplit

      private List<CreatureType> creaturesToSplit
    • oldBox

      private final Box oldBox
    • newBox

      private final Box newBox
    • buttonBox

      private final Box buttonBox
    • doneButton

      private final JButton doneButton
    • cancelButton

      private final JButton cancelButton
    • skipButton

      private final JButton skipButton
    • totalChits

      private final int totalChits
    • scale

      private final int scale
    • saveWindow

      private final SaveWindow saveWindow
  • Constructor Details

  • Method Details

    • splitLegion

      static List<CreatureType> splitLegion(ClientGUI gui, Legion parent, String selectedMarkerId)
      Opens a dialog to select the creatures to split and returns the result.
      Returns:
      The list of creature types selected for the split or null if the split was cancelled.
    • moveChitToOtherLine

      private void moveChitToOtherLine(List<Chit> fromChits, List<Chit> toChits, Container fromBox, Container toBox, int oldPosition)
      Move a chit to the end of the other line.
    • isSplitLegal

      private boolean isSplitLegal(boolean showMessage)
      Return true if the split is legal. Each legion must have height >= 2. If this was an initial split, each legion must have height == 4 and one lord.
    • cancel

      private void cancel()
    • markSkip

      private void markSkip()
    • returnSplitResults

      private void returnSplitResults()