Class BattleBoard

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

public final class BattleBoard extends KFrame
A GUI representation of a battle in the game. TODO this is split of the former BattleMap which did everything by itself. The split is not really completed, there is still code which potentially belongs into the other class.
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • handleMousePressed

      private void handleMousePressed(GUIBattleChit battleChit, GUIBattleHex hex)
    • actOnWindowClosingAttempt

      private void actOnWindowClosingAttempt()
    • setBattleMarkerLocation

      private void setBattleMarkerLocation(boolean isDefender, String hexLabel)
    • getClient

      private Client getClient()
    • getGame

      private GameClientSide getGame()
    • isFightPhase

      private boolean isFightPhase()
    • isMovePhase

      private boolean isMovePhase()
    • isMyBattleTurn

      private boolean isMyBattleTurn()
    • getInfoText

      private String getInfoText()
    • setupActions

      private void setupActions()
    • setupTopMenu

      private void setupTopMenu()
    • setupHelpMenu

      private void setupHelpMenu()
    • setupSummonMenu

      public void setupSummonMenu()
    • setupRecruitMenu

      public void setupRecruitMenu()
    • setupMoveMenu

      public void setupMoveMenu()
    • setupFightMenu

      void setupFightMenu()
    • updatePhaseAndTurn

      public void updatePhaseAndTurn()
    • setupIcon

      private void setupIcon()
    • getBattleChitAtPoint

      private GUIBattleChit getBattleChitAtPoint(Point point)
      Return the BattleChit containing the given point, or null if none does.
    • alignChits

      public void alignChits(BattleHex battleHex)
    • alignChits

      private void alignChits(Set<BattleHex> battleHexes)
    • highlightMobileCritters

      public void highlightMobileCritters()
      Select all hexes containing critters eligible to move.
    • highlightMoves

      private void highlightMoves(BattleCritter critter)
    • highlightCrittersWithTargets

      public void highlightCrittersWithTargets()
      Select hexes containing critters that have valid strike targets.
    • highlightStrikes

      private void highlightStrikes(BattleUnit battleUnit)
      Highlight all hexes with targets that the critter can strike.
    • highlightPossibleCarries

      public void highlightPossibleCarries(Set<BattleHex> set)
      Highlight all hexes to which carries could be applied
    • setWaitCursor

      private void setWaitCursor()
    • setDefaultCursor

      private void setDefaultCursor()
    • confirmLeavingCreaturesOffboard

      private boolean confirmLeavingCreaturesOffboard()
    • isMyTitanOffboard

      private boolean isMyTitanOffboard()
    • actOnCritter

      private void actOnCritter(GUIBattleChit battleChit)
    • actOnHex

      private void actOnHex(BattleHex hex)
    • actOnMisclick

      private void actOnMisclick()
    • actOnPendingBattleMoveOver

      public void actOnPendingBattleMoveOver()
    • rescale

      public void rescale()
    • reqFocus

      public void reqFocus()
    • enableDoneButton

      private void enableDoneButton()
    • disableDoneButton

      private void disableDoneButton()
    • unselectAllHexes

      public void unselectAllHexes()
    • unselectHex

      public void unselectHex(BattleHex hex)
    • actOnHitsSet

      public void actOnHitsSet(BattleHex battleHex)
    • repaintHex

      private void repaintHex(BattleHex battleHex)
    • addDiceResults

      public void addDiceResults(String strikerDesc, String targetDesc, int targetNumber, List<String> rolls)
    • getBattleHexByLabel

      public BattleHex getBattleHexByLabel(String hexLabel)
    • toString

      public String toString()
      Overrides:
      toString in class Component
    • dispose

      public void dispose()
      Overrides:
      dispose in class KFrame