Class MineLayingDialog

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

public class MineLayingDialog extends JDialog implements ActionListener
A dialog displayed to the player when they want to lay mines with their BA unit.
See Also:
  • Constructor Details

    • MineLayingDialog

      public MineLayingDialog(JFrame parent, Entity entity)
      Display a dialog that shows the mines on the entity, and allows the player to choose one.
      Parameters:
      parent - the Frame parent of this dialog
      entity - the Entity that carries the mines.
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Specified by:
      actionPerformed in interface ActionListener
    • getAnswer

      public boolean getAnswer()
    • getMine

      public int getMine()
      Get the id of the mine the player wants to use.
      Returns:
      the int id of the mine to lay