Package net.sf.colossus.gui
Class ClientGUI
- java.lang.Object
-
- net.sf.colossus.gui.ClientGUI
-
- All Implemented Interfaces:
IClientGUI
,GUICallbacks
public class ClientGUI extends java.lang.Object implements IClientGUI, GUICallbacks
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
ClientGUI.PendingMove
-
Field Summary
Fields Modifier and Type Field Description private AutoInspector
autoInspector
private BattleBoard
battleBoard
private java.util.List<GUIBattleChit>
battleChits
private MasterBoard
board
private CreatureCollectionView
caretakerDisplay
protected Client
client
private static int
CONN_CHECK_TIMEOUT
private java.lang.Object
connectionCheckMutex
private javax.swing.Timer
connectionCheckTimer
private ConnectionLogWindow
connectionLogWindow
private EngagementResults
engagementResults
private EventViewer
eventViewer
private boolean
gameOverMessageAlreadyShown
private long
lastConnectionCheckPackageSent
private int
legionMoveConfirmationMode
private static java.util.logging.Logger
LOGGER
private LogWindow
logWindow
(package private) java.lang.String
message
private MovementDie
movementDie
private Legion
mover
Information on the current moving legion.private Negotiate
negotiate
private int
nextSplitClickMode
private Options
options
protected IOracle
oracle
private java.util.Set<MasterHex>
pendingMoveHexes
private java.util.LinkedList<ClientGUI.PendingMove>
pendingMoves
private PickCarry
pickCarryDialog
private PreferencesWindow
preferencesWindow
(package private) boolean
quitAlreadyTried
private boolean
recoveredFromMoveNak
private int
recruitChitMode
private int
replayLastTurn
private int
replayMaxTurn
private ReplyToProposal
replyToProposal
private javax.swing.JFrame
secondaryParent
the parent frame for secondary windowsprivate boolean
startedByWebClient
private StatusScreen
statusScreen
private java.util.List<java.lang.Boolean>
tellEngagementResultsAttackerLegionCertainities
private java.util.List<java.lang.String>
tellEngagementResultsAttackerStartingContents
private java.util.List<java.lang.Boolean>
tellEngagementResultsDefenderLegionCertainities
private java.util.List<java.lang.String>
tellEngagementResultsDefenderStartingContents
private java.util.LinkedList<java.lang.Object>
undoStack
Stack of legion marker ID's, to allow multiple levels of undo for splits, moves, and recruits.private int
viewMode
private WebClient
webClient
private WhatNextManager
whatNextManager
The object which handles what to do next when a game is going to end
-
Constructor Summary
Constructors Constructor Description ClientGUI(Client client, Options options, WhatNextManager whatNextMgr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
acquireAngelCallback(Legion legion, CreatureType angelType)
void
actOnAddCreature(Legion legion, CreatureType creature, java.lang.String reason)
void
actOnApplyCarries(BattleHex hex)
void
actOnCleanupBattle()
void
actOnDidMove(Legion legion, MasterHex startingHex, MasterHex currentHex, boolean teleport, CreatureType teleportingLord, boolean splitLegionHasForcedMove)
void
actOnDidRecruit(Legion legion, CreatureType recruit, java.util.List<CreatureType> recruiters, java.lang.String reason)
void
actOnDidSplit(int turn, Legion parent, Legion child, MasterHex hex)
void
actOnDidSplitPart2(MasterHex hex)
void
actOnDoneWithBattleMoves()
void
actOnDoneWithMoves()
void
actOnDoneWithSplits()
void
actOnDoSummon()
void
actOnEngagementCompleted()
void
actOnGameStarting()
void
actOnGameStartingFailed()
void
actOnHitsSet(BattleUnit target)
void
actOnInitBattle()
void
actOnMoveNak()
void
actOnNoMoreEngagements()
void
actOnPendingBattleMoveOver()
void
actOnPlaceNewChit(java.lang.String imageName, BattleUnit battleUnit, BattleHex hex)
void
actOnReconnectCompleted()
void
actOnRemoveCreature(Legion legion, CreatureType type, java.lang.String reason)
void
actOnRemoveCreaturePart2(Legion legion)
void
actOnRemoveLegion(Legion legion)
void
actOnSetupBattleFight()
void
actOnSetupBattleMove()
void
actOnSetupBattleRecruit()
void
actOnSetupBattleSummon()
void
actOnSetupFight()
void
actOnSetupMove()
void
actOnSetupMuster()
void
actOnSetupSplit()
void
actOnTellBattleMove(BattleHex startingHex, BattleHex endingHex, boolean rememberForUndo)
void
actOnTellEngagementResults(Legion winner, java.lang.String method, int points, int turns)
void
actOnTellGameOver(java.lang.String message, boolean disposeFollows)
Update Board and Status screen to reflect the new game over state.void
actOnTellLegionLocation(Legion legion, MasterHex hex)
void
actOnTellMovementRoll(int roll)
void
actOnTellRedoChange()
void
actOnTellReplay(int maxTurn)
void
actOnTellStrikeResults(boolean wasCarry, int strikeNumber, java.util.List<java.lang.String> rolls, BattleCritter striker, BattleCritter target)
void
actOnTurnOrPlayerChange(Client client, int turnNr, Player player)
void
actOnUndidMove(Legion legion, MasterHex formerHex, MasterHex currentHex, boolean splitLegionHasForcedMove, boolean didTeleport)
void
actOnUndidRecruitPart(Legion legion, boolean wasReinforcement, int turnNumber)
void
actOnUndidSplit(Legion survivor, int turn)
void
actualDisposePickCarryDialog()
private void
addBattleChit(GUIBattleChit battleChit)
void
addPossibleRecruitChits(LegionClientSide legion, java.util.Set<MasterHex> hexes)
void
alignLegionsMaybe(Legion legion)
void
answerConcede(Legion legion, boolean answer)
void
answerFlee(Legion ally, boolean answer)
void
answerPickColor(PlayerColor color)
void
appendToConnectionLog(java.lang.String s)
void
applyCarries(BattleHex hex)
(package private) void
askNewCloseQuitCancel(javax.swing.JFrame frame, boolean fromBattleBoard)
void
autoInspectorSetDubiousAsBlanks(boolean newValue)
void
bringUpPickColorDialog(java.lang.String playerName, java.util.List<PlayerColor> colorsLeft)
(package private) void
checkServerConnection()
When user requests it from File menu, this method here requests the server to send us a confirmation package, to confirm that connection is still alive and ok.boolean
chooseWhetherToTeleport()
Present a dialog allowing the player to enter via land or teleport.private void
cleanupGUI()
void
cleanupNegotiationDialogs()
private void
clearUndoStack()
void
concede()
void
createPickMarkerDialog(ClientGUI gui, java.util.Set<java.lang.String> markerIds, Legion parent)
void
defaultCursor()
void
didSummon(Legion summoner, Legion donor, CreatureType summon)
private void
displayNoUndoWhilePendingMovesInfo()
private void
disposeBattleBoard()
private void
disposeCaretakerDisplay()
private void
disposeConnectionLogWindow()
(package private) void
disposeEngagementResults()
private void
disposeEventViewer()
void
disposeInspector()
private void
disposeLogWindow()
private void
disposeMasterBoard()
private void
disposeMovementDie()
void
disposePickCarryDialog()
Dispose the PickCarryDialog, make sure that that is done inside the EDT (caused GUI to hang in 1.6.0_39 whereas in 1.6.0_38 it worked )-;private void
disposePreferencesWindow()
private void
disposeStatusScreen()
void
doAcquireAngel(Legion legion, java.util.List<CreatureType> recruits)
void
doBattleMove(int tag, BattleHex hex)
void
doCleanupGUI()
void
doConfirmAndQuit()
boolean
doMove(MasterHex hex)
private void
doNewBattleBoard()
void
doneWithBattleMoves()
void
doneWithStrikes()
void
doPickCarries(Client client, int carryDamage, java.util.Set<java.lang.String> carryTargetDescriptions)
void
doPickColor(java.lang.String playerName, java.util.List<PlayerColor> colorsLeft)
EntrySide
doPickEntrySide(MasterHex hex, java.util.Set<EntrySide> entrySides)
void
doPickInitialMarker(java.util.Set<java.lang.String> markersAvailable)
CreatureType
doPickLord(java.util.List<CreatureType> lords)
CreatureType
doPickRecruit(Legion legion, java.lang.String hexDescription)
java.lang.String
doPickRecruiter(java.util.List<java.lang.String> recruiters, java.lang.String hexDescription, Legion legion)
java.util.List<CreatureType>
doPickSplitLegion(Legion parent, java.lang.String childMarker)
void
doPickSplitMarker(Legion parent, java.util.Set<java.lang.String> markersAvailable)
void
doPickStrikePenalty(Client client, java.util.List<java.lang.String> choices)
void
doPickSummonAngel(Legion legion, java.util.List<Legion> possibleDonors)
private void
doSetWhatToDoNext(WhatNextManager.WhatToDoNext whatToDoNext, boolean triggerQuitTimer)
private void
doSetWhatToDoNext(WhatNextManager.WhatToDoNext whatToDoNext, java.lang.String loadFile)
(package private) void
doShowMessageDialog(java.lang.String message)
void
engagementResultsMaybeShow()
private void
ensureEdtNewBattleBoard()
private void
ensureEdtSetupClientGUI()
Ensure that setupClientGUI() is run inside the EDTvoid
eventViewerCancelReinforcement(CreatureType recruit, int turnNr)
void
eventViewerNewSplitEvent(int turn, Legion parent, Legion child)
void
eventViewerRevealCreatures(Legion legion, java.util.List<CreatureType> creatures, java.lang.String reason)
void
eventViewerSetCreatureDead(BattleUnit battleUnit)
void
eventViewerSetVisibleMaybe()
void
eventViewerUndoEvent(Legion splitoff, Legion survivor, int turn)
private void
finishServerConnectionCheck(boolean success)
Cleanup everything related to the serverConnectionCheck timer, and show a message telling whether it went ok or not.private java.lang.String
getBattleUnitDescription(BattleCritter battleUnit)
MasterBoard
getBoard()
GUICallbacks
getCallbackHandler()
Client
getClient()
Game
getGame()
GameClientSide
getGameClientSide()
GUIBattleChit
getGUIBattleChit(BattleHex hex)
java.util.List<GUIBattleChit>
getGUIBattleChits()
Get a list of all GUIBattleChits (on the current BattleMap)java.util.List<GUIBattleChit>
getGUIBattleChitsInHex(BattleHex hex)
Find all GUIBattleChits that occupy a specified hex Note that this can be several for the offboard position(s)int
getLegionMoveConfirmationMode()
private javax.swing.JFrame
getMapOrBoardFrame()
(package private) java.lang.String
getMessage()
(package private) MovementDie
getMovementDie()
Legion
getMover()
int
getNextSplitClickMode()
IOptions
getOptions()
IOracle
getOracle()
Player
getOwningPlayer()
java.lang.String
getOwningPlayerName()
java.util.Set<MasterHex>
getPendingMoveHexes()
PickCarry
getPickCarryDialog()
private javax.swing.JFrame
getPreferredParent()
int
getRecruitChitMode()
boolean
getStartedByWebClient()
java.util.Set<MasterHex>
getStillToMoveHexes()
int
getViewMode()
void
handlePickCarry(GUIBattleHex hex)
private void
handleUndoRecruit(Legion legion)
This does the actual work for undoing a recruitvoid
handleWebClientRestore()
boolean
hasBoard()
(package private) void
highlightBattleSite(MasterHex battleSite)
void
highlightCrittersWithTargets()
void
highlightEngagements()
void
informSplitRequiredFirstRound()
void
initBoard()
private void
initEventViewer()
private void
initiateConnectionCheck()
private void
initPreferencesWindow()
void
initShowEngagementResults()
boolean
isMyTurn()
boolean
isPickCarryOngoing()
(package private) boolean
isRedoOngoing()
(package private) boolean
isReplayOngoing()
private boolean
isUndoStackEmpty()
void
leaveCarryMode()
void
makeBoardRecreateMarkers()
void
markLegionAsSkipRecruit(Legion legion)
TODO This is just a HACK.private void
markLegionAsSkipSplit(Legion legion)
void
menuCloseBoard()
void
menuLoadGame(java.lang.String filename)
void
menuNewGame()
void
menuQuitGame()
(package private) void
menuSaveGame(java.lang.String filename)
private void
myTurnNotificationActions(Legion ally)
(package private) void
negotiateCallback(Proposal proposal, boolean respawn)
private java.lang.Object
popUndoStack()
private void
postRecruitStuff(Legion legion)
Do what is needed after recruit (or mark as skip recruit): push to undo stack, update legions left to muster, hightlight remaining ones,(package private) void
pushUndoStack(java.lang.Object object)
void
removeBattleChit(BattleUnit battleUnit)
void
repaintAllWindows()
void
repaintBattleBoard()
void
replayTurnChange(int nowTurn)
void
rescaleAllWindows()
TODO since we are doing Swing nowadays it would probably be much better to replace all this rescaling code with just usingAffineTransform
on the rightGraphics2D
instances.void
resetAllLegionFlags()
void
resetStrikeNumbers()
reset all strike numbers on chitsvoid
respawnNegotiate()
void
revealEngagedCreatures(Legion legion, java.util.List<CreatureType> creatures, boolean isAttacker, java.lang.String reason)
void
serverConfirmsConnection()
Upon request with checkServerConnection, server sends a confirmation.void
setBoardActive(boolean val)
void
setChosenDevice(java.awt.GraphicsDevice chosen)
void
setClientInWebClientNull()
void
setLookAndFeel(java.lang.String lfName)
(package private) void
setMarker(Legion legion, Marker marker)
Add the marker to the end of the list and to the LegionInfo.void
setMoveCompleted(Legion mover, MasterHex current, MasterHex target)
void
setMovePending(Legion mover, MasterHex currentHex, MasterHex targetHex)
void
setMover(Legion legion)
void
setMulliganOldRoll(int movementRoll)
void
setPreferencesCheckBoxValue(java.lang.String name, boolean value)
void
setPreferencesRadioButtonValue(java.lang.String name, boolean value)
void
setPreferencesWindowVisible(boolean val)
void
setStartedByWebClient(boolean byWebClient)
void
setStrikeNumbers(BattleUnit striker, java.util.Set<BattleHex> targetHexes)
void
setupClientGUI()
Called via ensureEdtSetupClientGUI() when server sends all clients the initBoard command.private void
setupGUIOptionListeners()
private void
setupPlayerLabel()
void
setWebClient(WebClient wc)
private void
setWhatToDoNextForClose()
void
showConcede(Client client, Legion ally, Legion enemy)
void
showConnectionClosedMessage()
This is for permanent, non-reversible closed connectionsvoid
showFlee(Client client, Legion ally, Legion enemy)
void
showHexRecruitTree(GUIMasterHex hex)
void
showMarker(Marker marker)
void
showMessageDialogAndWait(java.lang.String message)
void
showNegotiate(Legion attacker, Legion defender)
private void
showOrHideAutoInspector(boolean bval)
private void
showOrHideCaretaker(boolean bval)
private void
showOrHideConnectionLogWindow(boolean show)
private void
showOrHideLogWindow(boolean show)
void
showWebClient()
void
strike(int tag, BattleHex hex)
void
syncCheckboxes()
Ensure that Player menu checkboxes reflect the correct state.void
tellEngagement(Legion attacker, Legion defender, int turnNumber)
void
tellProposal(java.lang.String proposalString)
Inform this player about the other player's proposal.void
tellWhatsHappening(java.lang.String message)
void
timeoutAbortsConnectionCheck()
Timeout reached.void
undoAllBattleMoves()
void
undoAllMoves()
void
undoAllRecruits()
(package private) void
undoAllSplits()
void
undoBattleMove(BattleHex hex)
void
undoLastBattleMove()
(package private) void
undoLastMove()
(package private) void
undoLastRecruit()
For the topmost item on undo stack, undo the done recruit, or reset the skipThisTime flag if set.(package private) void
undoLastSplit()
void
undoRecruit(Legion legion)
For a specific clicked legion, undo the done recruit, or reset the skipThisTime flag if set.void
updateCreatureCountDisplay()
void
updateEverything()
private void
updatePendingText()
void
updateStatusScreen()
private void
updateTreeAndPack(java.awt.Window window)
private void
validateLegions()
void
waitCursor()
-
-
-
Field Detail
-
LOGGER
private static final java.util.logging.Logger LOGGER
-
CONN_CHECK_TIMEOUT
private static final int CONN_CHECK_TIMEOUT
- See Also:
- Constant Field Values
-
connectionCheckMutex
private final java.lang.Object connectionCheckMutex
-
connectionCheckTimer
private javax.swing.Timer connectionCheckTimer
-
lastConnectionCheckPackageSent
private long lastConnectionCheckPackageSent
-
board
private MasterBoard board
-
statusScreen
private StatusScreen statusScreen
-
caretakerDisplay
private CreatureCollectionView caretakerDisplay
-
movementDie
private MovementDie movementDie
-
engagementResults
private EngagementResults engagementResults
-
autoInspector
private AutoInspector autoInspector
-
eventViewer
private EventViewer eventViewer
-
preferencesWindow
private PreferencesWindow preferencesWindow
-
logWindow
private LogWindow logWindow
-
connectionLogWindow
private ConnectionLogWindow connectionLogWindow
-
pickCarryDialog
private PickCarry pickCarryDialog
-
negotiate
private Negotiate negotiate
-
replyToProposal
private ReplyToProposal replyToProposal
-
battleBoard
private BattleBoard battleBoard
-
webClient
private WebClient webClient
-
startedByWebClient
private boolean startedByWebClient
-
whatNextManager
private final WhatNextManager whatNextManager
The object which handles what to do next when a game is going to end
-
undoStack
private final java.util.LinkedList<java.lang.Object> undoStack
Stack of legion marker ID's, to allow multiple levels of undo for splits, moves, and recruits. (for battle actions, the Strings are not actually marker ID's, it's battle hex ID's there instead). TODO it would probably be good to have a full Command pattern here, similar to Swing'sUndoManager
stuff. In the GUI client we could/should probably just use that. A list of objects (which are mostly the string identifiers of something) isn't that safe.
-
pendingMoves
private final java.util.LinkedList<ClientGUI.PendingMove> pendingMoves
-
pendingMoveHexes
private final java.util.Set<MasterHex> pendingMoveHexes
-
recoveredFromMoveNak
private boolean recoveredFromMoveNak
-
battleChits
private final java.util.List<GUIBattleChit> battleChits
-
mover
private Legion mover
Information on the current moving legion.
-
secondaryParent
private javax.swing.JFrame secondaryParent
the parent frame for secondary windows
-
replayLastTurn
private int replayLastTurn
-
replayMaxTurn
private int replayMaxTurn
-
viewMode
private int viewMode
-
recruitChitMode
private int recruitChitMode
-
legionMoveConfirmationMode
private int legionMoveConfirmationMode
-
nextSplitClickMode
private int nextSplitClickMode
-
gameOverMessageAlreadyShown
private boolean gameOverMessageAlreadyShown
-
client
protected final Client client
-
oracle
protected final IOracle oracle
-
options
private final Options options
-
quitAlreadyTried
boolean quitAlreadyTried
-
tellEngagementResultsAttackerStartingContents
private java.util.List<java.lang.String> tellEngagementResultsAttackerStartingContents
-
tellEngagementResultsDefenderStartingContents
private java.util.List<java.lang.String> tellEngagementResultsDefenderStartingContents
-
tellEngagementResultsAttackerLegionCertainities
private java.util.List<java.lang.Boolean> tellEngagementResultsAttackerLegionCertainities
-
tellEngagementResultsDefenderLegionCertainities
private java.util.List<java.lang.Boolean> tellEngagementResultsDefenderLegionCertainities
-
message
java.lang.String message
-
-
Constructor Detail
-
ClientGUI
public ClientGUI(Client client, Options options, WhatNextManager whatNextMgr)
-
-
Method Detail
-
setStartedByWebClient
public void setStartedByWebClient(boolean byWebClient)
- Specified by:
setStartedByWebClient
in interfaceIClientGUI
-
getStartedByWebClient
public boolean getStartedByWebClient()
-
setWebClient
public void setWebClient(WebClient wc)
- Specified by:
setWebClient
in interfaceIClientGUI
-
setClientInWebClientNull
public void setClientInWebClientNull()
- Specified by:
setClientInWebClientNull
in interfaceIClientGUI
-
getBoard
public MasterBoard getBoard()
-
hasBoard
public boolean hasBoard()
- Specified by:
hasBoard
in interfaceIClientGUI
-
getClient
public Client getClient()
-
getOracle
public IOracle getOracle()
-
getGame
public Game getGame()
-
getGameClientSide
public GameClientSide getGameClientSide()
-
getOptions
public IOptions getOptions()
-
isReplayOngoing
boolean isReplayOngoing()
-
isRedoOngoing
boolean isRedoOngoing()
-
handleWebClientRestore
public void handleWebClientRestore()
- Specified by:
handleWebClientRestore
in interfaceIClientGUI
-
showWebClient
public void showWebClient()
- Specified by:
showWebClient
in interfaceIClientGUI
-
initBoard
public void initBoard()
- Specified by:
initBoard
in interfaceIClientGUI
-
actOnGameStartingFailed
public void actOnGameStartingFailed()
- Specified by:
actOnGameStartingFailed
in interfaceIClientGUI
-
ensureEdtSetupClientGUI
private void ensureEdtSetupClientGUI()
Ensure that setupClientGUI() is run inside the EDT
-
setupClientGUI
public void setupClientGUI()
Called via ensureEdtSetupClientGUI() when server sends all clients the initBoard command.
-
setChosenDevice
public void setChosenDevice(java.awt.GraphicsDevice chosen)
- Specified by:
setChosenDevice
in interfaceIClientGUI
-
ensureEdtNewBattleBoard
private void ensureEdtNewBattleBoard()
-
actOnInitBattle
public void actOnInitBattle()
- Specified by:
actOnInitBattle
in interfaceIClientGUI
-
doNewBattleBoard
private void doNewBattleBoard()
-
setStrikeNumbers
public void setStrikeNumbers(BattleUnit striker, java.util.Set<BattleHex> targetHexes)
-
resetStrikeNumbers
public void resetStrikeNumbers()
reset all strike numbers on chits- Specified by:
resetStrikeNumbers
in interfaceIClientGUI
-
updateStatusScreen
public void updateStatusScreen()
- Specified by:
updateStatusScreen
in interfaceIClientGUI
-
menuCloseBoard
public void menuCloseBoard()
- Specified by:
menuCloseBoard
in interfaceIClientGUI
-
menuQuitGame
public void menuQuitGame()
- Specified by:
menuQuitGame
in interfaceIClientGUI
-
askNewCloseQuitCancel
void askNewCloseQuitCancel(javax.swing.JFrame frame, boolean fromBattleBoard)
-
checkServerConnection
void checkServerConnection()
When user requests it from File menu, this method here requests the server to send us a confirmation package, to confirm that connection is still alive and ok.
-
initiateConnectionCheck
private void initiateConnectionCheck()
-
serverConfirmsConnection
public void serverConfirmsConnection()
Description copied from interface:IClientGUI
Upon request with checkServerConnection, server sends a confirmation. This method here processes the confirmation.- Specified by:
serverConfirmsConnection
in interfaceIClientGUI
-
timeoutAbortsConnectionCheck
public void timeoutAbortsConnectionCheck()
Description copied from interface:IClientGUI
Timeout reached. Cancel timer and show error message- Specified by:
timeoutAbortsConnectionCheck
in interfaceIClientGUI
-
finishServerConnectionCheck
private void finishServerConnectionCheck(boolean success)
Cleanup everything related to the serverConnectionCheck timer, and show a message telling whether it went ok or not. Called by either serverConfirmsConnection() or timeoutAbortsConnectionCheck(), which both synchronize on the connectionCheckMutex.
-
doSetWhatToDoNext
private void doSetWhatToDoNext(WhatNextManager.WhatToDoNext whatToDoNext, boolean triggerQuitTimer)
-
doSetWhatToDoNext
private void doSetWhatToDoNext(WhatNextManager.WhatToDoNext whatToDoNext, java.lang.String loadFile)
-
setWhatToDoNextForClose
private void setWhatToDoNextForClose()
-
menuNewGame
public void menuNewGame()
- Specified by:
menuNewGame
in interfaceIClientGUI
-
menuLoadGame
public void menuLoadGame(java.lang.String filename)
- Specified by:
menuLoadGame
in interfaceIClientGUI
-
menuSaveGame
void menuSaveGame(java.lang.String filename)
-
setupPlayerLabel
private void setupPlayerLabel()
-
highlightEngagements
public void highlightEngagements()
- Specified by:
highlightEngagements
in interfaceIClientGUI
-
getPreferredParent
private javax.swing.JFrame getPreferredParent()
-
getViewMode
public int getViewMode()
- Specified by:
getViewMode
in interfaceIClientGUI
-
getRecruitChitMode
public int getRecruitChitMode()
- Specified by:
getRecruitChitMode
in interfaceIClientGUI
-
getLegionMoveConfirmationMode
public int getLegionMoveConfirmationMode()
- Specified by:
getLegionMoveConfirmationMode
in interfaceIClientGUI
-
getNextSplitClickMode
public int getNextSplitClickMode()
- Specified by:
getNextSplitClickMode
in interfaceIClientGUI
-
addPossibleRecruitChits
public void addPossibleRecruitChits(LegionClientSide legion, java.util.Set<MasterHex> hexes)
- Specified by:
addPossibleRecruitChits
in interfaceIClientGUI
-
setupGUIOptionListeners
private void setupGUIOptionListeners()
-
initEventViewer
private void initEventViewer()
-
eventViewerSetVisibleMaybe
public void eventViewerSetVisibleMaybe()
- Specified by:
eventViewerSetVisibleMaybe
in interfaceIClientGUI
-
autoInspectorSetDubiousAsBlanks
public void autoInspectorSetDubiousAsBlanks(boolean newValue)
- Specified by:
autoInspectorSetDubiousAsBlanks
in interfaceIClientGUI
-
engagementResultsMaybeShow
public void engagementResultsMaybeShow()
- Specified by:
engagementResultsMaybeShow
in interfaceIClientGUI
-
actOnTellLegionLocation
public void actOnTellLegionLocation(Legion legion, MasterHex hex)
- Specified by:
actOnTellLegionLocation
in interfaceIClientGUI
-
setMarker
void setMarker(Legion legion, Marker marker)
Add the marker to the end of the list and to the LegionInfo. If it's already in the list, remove the earlier entry.
-
actOnDidSplit
public void actOnDidSplit(int turn, Legion parent, Legion child, MasterHex hex)
- Specified by:
actOnDidSplit
in interfaceIClientGUI
-
actOnDidSplitPart2
public void actOnDidSplitPart2(MasterHex hex)
- Specified by:
actOnDidSplitPart2
in interfaceIClientGUI
-
actOnDoneWithMoves
public void actOnDoneWithMoves()
- Specified by:
actOnDoneWithMoves
in interfaceIClientGUI
-
actOnDoneWithSplits
public void actOnDoneWithSplits()
- Specified by:
actOnDoneWithSplits
in interfaceIClientGUI
-
actOnDidRecruit
public void actOnDidRecruit(Legion legion, CreatureType recruit, java.util.List<CreatureType> recruiters, java.lang.String reason)
- Specified by:
actOnDidRecruit
in interfaceIClientGUI
-
postRecruitStuff
private void postRecruitStuff(Legion legion)
Do what is needed after recruit (or mark as skip recruit): push to undo stack, update legions left to muster, hightlight remaining ones,- Parameters:
legion
-
-
actOnRemoveCreature
public void actOnRemoveCreature(Legion legion, CreatureType type, java.lang.String reason)
- Specified by:
actOnRemoveCreature
in interfaceIClientGUI
-
actOnRemoveCreaturePart2
public void actOnRemoveCreaturePart2(Legion legion)
- Specified by:
actOnRemoveCreaturePart2
in interfaceIClientGUI
-
actOnAddCreature
public void actOnAddCreature(Legion legion, CreatureType creature, java.lang.String reason)
- Specified by:
actOnAddCreature
in interfaceIClientGUI
-
actOnUndidSplit
public void actOnUndidSplit(Legion survivor, int turn)
- Specified by:
actOnUndidSplit
in interfaceIClientGUI
-
actOnUndidRecruitPart
public void actOnUndidRecruitPart(Legion legion, boolean wasReinforcement, int turnNumber)
- Specified by:
actOnUndidRecruitPart
in interfaceIClientGUI
-
chooseWhetherToTeleport
public boolean chooseWhetherToTeleport()
Description copied from interface:IClientGUI
Present a dialog allowing the player to enter via land or teleport. Return true if the player chooses to teleport.- Specified by:
chooseWhetherToTeleport
in interfaceIClientGUI
-
actOnDidMove
public void actOnDidMove(Legion legion, MasterHex startingHex, MasterHex currentHex, boolean teleport, CreatureType teleportingLord, boolean splitLegionHasForcedMove)
- Specified by:
actOnDidMove
in interfaceIClientGUI
-
actOnUndidMove
public void actOnUndidMove(Legion legion, MasterHex formerHex, MasterHex currentHex, boolean splitLegionHasForcedMove, boolean didTeleport)
- Specified by:
actOnUndidMove
in interfaceIClientGUI
-
actOnNoMoreEngagements
public void actOnNoMoreEngagements()
- Specified by:
actOnNoMoreEngagements
in interfaceIClientGUI
-
alignLegionsMaybe
public void alignLegionsMaybe(Legion legion)
- Specified by:
alignLegionsMaybe
in interfaceIClientGUI
-
actOnRemoveLegion
public void actOnRemoveLegion(Legion legion)
- Specified by:
actOnRemoveLegion
in interfaceIClientGUI
-
actOnDoSummon
public void actOnDoSummon()
- Specified by:
actOnDoSummon
in interfaceIClientGUI
-
setLookAndFeel
public void setLookAndFeel(java.lang.String lfName)
- Specified by:
setLookAndFeel
in interfaceIClientGUI
-
updateEverything
public void updateEverything()
- Specified by:
updateEverything
in interfaceIClientGUI
-
updateTreeAndPack
private void updateTreeAndPack(java.awt.Window window)
-
replayTurnChange
public void replayTurnChange(int nowTurn)
- Specified by:
replayTurnChange
in interfaceIClientGUI
-
actOnTellReplay
public void actOnTellReplay(int maxTurn)
- Specified by:
actOnTellReplay
in interfaceIClientGUI
-
makeBoardRecreateMarkers
public void makeBoardRecreateMarkers()
-
actOnTellRedoChange
public void actOnTellRedoChange()
- Specified by:
actOnTellRedoChange
in interfaceIClientGUI
-
clearUndoStack
private void clearUndoStack()
-
popUndoStack
private java.lang.Object popUndoStack()
-
pushUndoStack
void pushUndoStack(java.lang.Object object)
-
isUndoStackEmpty
private boolean isUndoStackEmpty()
-
eventViewerCancelReinforcement
public void eventViewerCancelReinforcement(CreatureType recruit, int turnNr)
- Specified by:
eventViewerCancelReinforcement
in interfaceIClientGUI
-
eventViewerSetCreatureDead
public void eventViewerSetCreatureDead(BattleUnit battleUnit)
- Specified by:
eventViewerSetCreatureDead
in interfaceIClientGUI
-
eventViewerNewSplitEvent
public void eventViewerNewSplitEvent(int turn, Legion parent, Legion child)
- Specified by:
eventViewerNewSplitEvent
in interfaceIClientGUI
-
eventViewerUndoEvent
public void eventViewerUndoEvent(Legion splitoff, Legion survivor, int turn)
- Specified by:
eventViewerUndoEvent
in interfaceIClientGUI
-
setPreferencesCheckBoxValue
public void setPreferencesCheckBoxValue(java.lang.String name, boolean value)
- Specified by:
setPreferencesCheckBoxValue
in interfaceIClientGUI
-
setPreferencesRadioButtonValue
public void setPreferencesRadioButtonValue(java.lang.String name, boolean value)
- Specified by:
setPreferencesRadioButtonValue
in interfaceIClientGUI
-
initPreferencesWindow
private void initPreferencesWindow()
-
setPreferencesWindowVisible
public void setPreferencesWindowVisible(boolean val)
- Specified by:
setPreferencesWindowVisible
in interfaceIClientGUI
-
showMarker
public void showMarker(Marker marker)
-
showOrHideCaretaker
private void showOrHideCaretaker(boolean bval)
-
showOrHideAutoInspector
private void showOrHideAutoInspector(boolean bval)
-
showHexRecruitTree
public void showHexRecruitTree(GUIMasterHex hex)
-
didSummon
public void didSummon(Legion summoner, Legion donor, CreatureType summon)
- Specified by:
didSummon
in interfaceIClientGUI
-
repaintBattleBoard
public void repaintBattleBoard()
- Specified by:
repaintBattleBoard
in interfaceIClientGUI
-
repaintAllWindows
public void repaintAllWindows()
- Specified by:
repaintAllWindows
in interfaceIClientGUI
-
rescaleAllWindows
public void rescaleAllWindows()
Description copied from interface:IClientGUI
TODO since we are doing Swing nowadays it would probably be much better to replace all this rescaling code with just usingAffineTransform
on the rightGraphics2D
instances.- Specified by:
rescaleAllWindows
in interfaceIClientGUI
-
disposeInspector
public void disposeInspector()
- Specified by:
disposeInspector
in interfaceIClientGUI
-
updateCreatureCountDisplay
public void updateCreatureCountDisplay()
- Specified by:
updateCreatureCountDisplay
in interfaceIClientGUI
-
disposeMasterBoard
private void disposeMasterBoard()
-
disposeBattleBoard
private void disposeBattleBoard()
-
disposePickCarryDialog
public void disposePickCarryDialog()
Dispose the PickCarryDialog, make sure that that is done inside the EDT (caused GUI to hang in 1.6.0_39 whereas in 1.6.0_38 it worked )-;- Specified by:
disposePickCarryDialog
in interfaceIClientGUI
-
actualDisposePickCarryDialog
public void actualDisposePickCarryDialog()
-
disposeStatusScreen
private void disposeStatusScreen()
-
disposeLogWindow
private void disposeLogWindow()
-
disposeConnectionLogWindow
private void disposeConnectionLogWindow()
-
disposeEventViewer
private void disposeEventViewer()
-
disposePreferencesWindow
private void disposePreferencesWindow()
-
disposeEngagementResults
void disposeEngagementResults()
-
disposeCaretakerDisplay
private void disposeCaretakerDisplay()
-
showNegotiate
public void showNegotiate(Legion attacker, Legion defender)
- Specified by:
showNegotiate
in interfaceIClientGUI
-
respawnNegotiate
public void respawnNegotiate()
- Specified by:
respawnNegotiate
in interfaceIClientGUI
-
showConcede
public void showConcede(Client client, Legion ally, Legion enemy)
- Specified by:
showConcede
in interfaceIClientGUI
-
showFlee
public void showFlee(Client client, Legion ally, Legion enemy)
- Specified by:
showFlee
in interfaceIClientGUI
-
myTurnNotificationActions
private void myTurnNotificationActions(Legion ally)
-
initShowEngagementResults
public void initShowEngagementResults()
- Specified by:
initShowEngagementResults
in interfaceIClientGUI
-
tellEngagement
public void tellEngagement(Legion attacker, Legion defender, int turnNumber)
- Specified by:
tellEngagement
in interfaceIClientGUI
-
highlightBattleSite
void highlightBattleSite(MasterHex battleSite)
-
actOnTellEngagementResults
public void actOnTellEngagementResults(Legion winner, java.lang.String method, int points, int turns)
- Specified by:
actOnTellEngagementResults
in interfaceIClientGUI
-
actOnEngagementCompleted
public void actOnEngagementCompleted()
- Specified by:
actOnEngagementCompleted
in interfaceIClientGUI
-
setMulliganOldRoll
public void setMulliganOldRoll(int movementRoll)
- Specified by:
setMulliganOldRoll
in interfaceIClientGUI
-
tellWhatsHappening
public void tellWhatsHappening(java.lang.String message)
- Specified by:
tellWhatsHappening
in interfaceIClientGUI
-
actOnTellMovementRoll
public void actOnTellMovementRoll(int roll)
- Specified by:
actOnTellMovementRoll
in interfaceIClientGUI
-
revealEngagedCreatures
public void revealEngagedCreatures(Legion legion, java.util.List<CreatureType> creatures, boolean isAttacker, java.lang.String reason)
- Specified by:
revealEngagedCreatures
in interfaceIClientGUI
-
eventViewerRevealCreatures
public void eventViewerRevealCreatures(Legion legion, java.util.List<CreatureType> creatures, java.lang.String reason)
- Specified by:
eventViewerRevealCreatures
in interfaceIClientGUI
-
showOrHideLogWindow
private void showOrHideLogWindow(boolean show)
-
showOrHideConnectionLogWindow
private void showOrHideConnectionLogWindow(boolean show)
-
appendToConnectionLog
public void appendToConnectionLog(java.lang.String s)
- Specified by:
appendToConnectionLog
in interfaceIClientGUI
-
actOnReconnectCompleted
public void actOnReconnectCompleted()
- Specified by:
actOnReconnectCompleted
in interfaceIClientGUI
-
syncCheckboxes
public void syncCheckboxes()
Ensure that Player menu checkboxes reflect the correct state. Copied the TODO below from the interface where it's now removed... TODO let the checkboxes have their own listeners instead. Or even better: use a binding framework.
-
doAcquireAngel
public void doAcquireAngel(Legion legion, java.util.List<CreatureType> recruits)
- Specified by:
doAcquireAngel
in interfaceIClientGUI
-
setBoardActive
public void setBoardActive(boolean val)
- Specified by:
setBoardActive
in interfaceIClientGUI
-
doPickSummonAngel
public void doPickSummonAngel(Legion legion, java.util.List<Legion> possibleDonors)
- Specified by:
doPickSummonAngel
in interfaceIClientGUI
-
doPickSplitLegion
public java.util.List<CreatureType> doPickSplitLegion(Legion parent, java.lang.String childMarker)
- Specified by:
doPickSplitLegion
in interfaceIClientGUI
-
markLegionAsSkipSplit
private void markLegionAsSkipSplit(Legion legion)
-
resetAllLegionFlags
public void resetAllLegionFlags()
-
isPickCarryOngoing
public boolean isPickCarryOngoing()
- Specified by:
isPickCarryOngoing
in interfaceIClientGUI
-
doPickCarries
public void doPickCarries(Client client, int carryDamage, java.util.Set<java.lang.String> carryTargetDescriptions)
- Specified by:
doPickCarries
in interfaceIClientGUI
-
getPickCarryDialog
public PickCarry getPickCarryDialog()
-
handlePickCarry
public void handlePickCarry(GUIBattleHex hex)
-
doPickColor
public void doPickColor(java.lang.String playerName, java.util.List<PlayerColor> colorsLeft)
- Specified by:
doPickColor
in interfaceIClientGUI
-
bringUpPickColorDialog
public void bringUpPickColorDialog(java.lang.String playerName, java.util.List<PlayerColor> colorsLeft)
-
doPickSplitMarker
public void doPickSplitMarker(Legion parent, java.util.Set<java.lang.String> markersAvailable)
- Specified by:
doPickSplitMarker
in interfaceIClientGUI
-
doPickInitialMarker
public void doPickInitialMarker(java.util.Set<java.lang.String> markersAvailable)
- Specified by:
doPickInitialMarker
in interfaceIClientGUI
-
createPickMarkerDialog
public void createPickMarkerDialog(ClientGUI gui, java.util.Set<java.lang.String> markerIds, Legion parent)
-
doPickRecruit
public CreatureType doPickRecruit(Legion legion, java.lang.String hexDescription)
- Specified by:
doPickRecruit
in interfaceIClientGUI
-
markLegionAsSkipRecruit
public void markLegionAsSkipRecruit(Legion legion)
TODO This is just a HACK. PickRecruit calls this to mark a legion as that user wants to not recruit anything this turn. Better would be, if that dialog could return a "NONE" CreatureType and the caller does the work cleanly... (postponed for now because the NONE-CreatureType would be so much work right now...)- Parameters:
legion
-
-
doPickRecruiter
public java.lang.String doPickRecruiter(java.util.List<java.lang.String> recruiters, java.lang.String hexDescription, Legion legion)
- Specified by:
doPickRecruiter
in interfaceIClientGUI
-
doPickEntrySide
public EntrySide doPickEntrySide(MasterHex hex, java.util.Set<EntrySide> entrySides)
- Specified by:
doPickEntrySide
in interfaceIClientGUI
-
doPickLord
public CreatureType doPickLord(java.util.List<CreatureType> lords)
- Specified by:
doPickLord
in interfaceIClientGUI
-
doPickStrikePenalty
public void doPickStrikePenalty(Client client, java.util.List<java.lang.String> choices)
- Specified by:
doPickStrikePenalty
in interfaceIClientGUI
-
tellProposal
public void tellProposal(java.lang.String proposalString)
Description copied from interface:IClientGUI
Inform this player about the other player's proposal.- Specified by:
tellProposal
in interfaceIClientGUI
-
cleanupNegotiationDialogs
public void cleanupNegotiationDialogs()
- Specified by:
cleanupNegotiationDialogs
in interfaceIClientGUI
-
actOnTurnOrPlayerChange
public void actOnTurnOrPlayerChange(Client client, int turnNr, Player player)
- Specified by:
actOnTurnOrPlayerChange
in interfaceIClientGUI
-
actOnGameStarting
public void actOnGameStarting()
- Specified by:
actOnGameStarting
in interfaceIClientGUI
-
actOnSetupSplit
public void actOnSetupSplit()
- Specified by:
actOnSetupSplit
in interfaceIClientGUI
-
validateLegions
private void validateLegions()
-
actOnSetupMuster
public void actOnSetupMuster()
- Specified by:
actOnSetupMuster
in interfaceIClientGUI
-
actOnSetupMove
public void actOnSetupMove()
- Specified by:
actOnSetupMove
in interfaceIClientGUI
-
actOnSetupFight
public void actOnSetupFight()
- Specified by:
actOnSetupFight
in interfaceIClientGUI
-
actOnSetupBattleFight
public void actOnSetupBattleFight()
- Specified by:
actOnSetupBattleFight
in interfaceIClientGUI
-
actOnSetupBattleMove
public void actOnSetupBattleMove()
- Specified by:
actOnSetupBattleMove
in interfaceIClientGUI
-
actOnTellBattleMove
public void actOnTellBattleMove(BattleHex startingHex, BattleHex endingHex, boolean rememberForUndo)
- Specified by:
actOnTellBattleMove
in interfaceIClientGUI
-
actOnPendingBattleMoveOver
public void actOnPendingBattleMoveOver()
- Specified by:
actOnPendingBattleMoveOver
in interfaceIClientGUI
-
actOnDoneWithBattleMoves
public void actOnDoneWithBattleMoves()
- Specified by:
actOnDoneWithBattleMoves
in interfaceIClientGUI
-
actOnSetupBattleRecruit
public void actOnSetupBattleRecruit()
- Specified by:
actOnSetupBattleRecruit
in interfaceIClientGUI
-
actOnSetupBattleSummon
public void actOnSetupBattleSummon()
- Specified by:
actOnSetupBattleSummon
in interfaceIClientGUI
-
addBattleChit
private void addBattleChit(GUIBattleChit battleChit)
-
getGUIBattleChits
public java.util.List<GUIBattleChit> getGUIBattleChits()
Get a list of all GUIBattleChits (on the current BattleMap)- Returns:
- The list of GUIBattleChits
-
getGUIBattleChitsInHex
public java.util.List<GUIBattleChit> getGUIBattleChitsInHex(BattleHex hex)
Find all GUIBattleChits that occupy a specified hex Note that this can be several for the offboard position(s)- Parameters:
hex
- The hex to give Chits for- Returns:
- A List of GUIBattleChits
-
getGUIBattleChit
public GUIBattleChit getGUIBattleChit(BattleHex hex)
-
actOnPlaceNewChit
public void actOnPlaceNewChit(java.lang.String imageName, BattleUnit battleUnit, BattleHex hex)
- Specified by:
actOnPlaceNewChit
in interfaceIClientGUI
-
getBattleUnitDescription
private java.lang.String getBattleUnitDescription(BattleCritter battleUnit)
-
actOnTellStrikeResults
public void actOnTellStrikeResults(boolean wasCarry, int strikeNumber, java.util.List<java.lang.String> rolls, BattleCritter striker, BattleCritter target)
- Specified by:
actOnTellStrikeResults
in interfaceIClientGUI
-
actOnHitsSet
public void actOnHitsSet(BattleUnit target)
- Specified by:
actOnHitsSet
in interfaceIClientGUI
-
highlightCrittersWithTargets
public void highlightCrittersWithTargets()
- Specified by:
highlightCrittersWithTargets
in interfaceIClientGUI
-
actOnApplyCarries
public void actOnApplyCarries(BattleHex hex)
- Specified by:
actOnApplyCarries
in interfaceIClientGUI
-
actOnCleanupBattle
public void actOnCleanupBattle()
- Specified by:
actOnCleanupBattle
in interfaceIClientGUI
-
undoLastRecruit
void undoLastRecruit()
For the topmost item on undo stack, undo the done recruit, or reset the skipThisTime flag if set.
-
undoRecruit
public void undoRecruit(Legion legion)
For a specific clicked legion, undo the done recruit, or reset the skipThisTime flag if set.- Specified by:
undoRecruit
in interfaceIClientGUI
- Parameters:
legion
- The legion for which to undo the recruit
-
handleUndoRecruit
private void handleUndoRecruit(Legion legion)
This does the actual work for undoing a recruit- Parameters:
legion
- The legion for which to undo the recruit
-
undoAllSplits
void undoAllSplits()
-
undoLastSplit
void undoLastSplit()
-
informSplitRequiredFirstRound
public void informSplitRequiredFirstRound()
- Specified by:
informSplitRequiredFirstRound
in interfaceIClientGUI
-
undoLastMove
void undoLastMove()
-
undoLastBattleMove
public void undoLastBattleMove()
- Specified by:
undoLastBattleMove
in interfaceIClientGUI
-
undoAllBattleMoves
public void undoAllBattleMoves()
- Specified by:
undoAllBattleMoves
in interfaceIClientGUI
-
undoAllMoves
public void undoAllMoves()
- Specified by:
undoAllMoves
in interfaceIClientGUI
-
undoAllRecruits
public void undoAllRecruits()
- Specified by:
undoAllRecruits
in interfaceIClientGUI
-
displayNoUndoWhilePendingMovesInfo
private void displayNoUndoWhilePendingMovesInfo()
-
defaultCursor
public void defaultCursor()
- Specified by:
defaultCursor
in interfaceIClientGUI
-
waitCursor
public void waitCursor()
- Specified by:
waitCursor
in interfaceIClientGUI
-
doCleanupGUI
public void doCleanupGUI()
- Specified by:
doCleanupGUI
in interfaceIClientGUI
-
disposeMovementDie
private void disposeMovementDie()
-
getMovementDie
MovementDie getMovementDie()
-
cleanupGUI
private void cleanupGUI()
-
actOnTellGameOver
public void actOnTellGameOver(java.lang.String message, boolean disposeFollows)
Update Board and Status screen to reflect the new game over state. Show the game over message, or store it to be shown later. If dispose will follow soon, don't show message immediately (to avoid having the user to have click two boxes), instead store it for later to be shown then together with the dispose dialog.- Specified by:
actOnTellGameOver
in interfaceIClientGUI
- Parameters:
message
- The message ("XXXX wins", or "Draw")disposeFollows
- If true, server will send a dispose message soon
-
getMessage
java.lang.String getMessage()
-
showMessageDialogAndWait
public void showMessageDialogAndWait(java.lang.String message)
- Specified by:
showMessageDialogAndWait
in interfaceIClientGUI
-
doShowMessageDialog
void doShowMessageDialog(java.lang.String message)
-
doConfirmAndQuit
public void doConfirmAndQuit()
- Specified by:
doConfirmAndQuit
in interfaceIClientGUI
-
showConnectionClosedMessage
public void showConnectionClosedMessage()
This is for permanent, non-reversible closed connections- Specified by:
showConnectionClosedMessage
in interfaceIClientGUI
-
getMapOrBoardFrame
private javax.swing.JFrame getMapOrBoardFrame()
-
negotiateCallback
void negotiateCallback(Proposal proposal, boolean respawn)
-
getOwningPlayer
public Player getOwningPlayer()
-
getOwningPlayerName
public java.lang.String getOwningPlayerName()
-
isMyTurn
public boolean isMyTurn()
-
getMover
public Legion getMover()
-
setMover
public void setMover(Legion legion)
-
doMove
public boolean doMove(MasterHex hex)
-
actOnMoveNak
public void actOnMoveNak()
- Specified by:
actOnMoveNak
in interfaceIClientGUI
-
setMovePending
public void setMovePending(Legion mover, MasterHex currentHex, MasterHex targetHex)
- Specified by:
setMovePending
in interfaceIClientGUI
-
updatePendingText
private void updatePendingText()
-
getPendingMoveHexes
public java.util.Set<MasterHex> getPendingMoveHexes()
-
getStillToMoveHexes
public java.util.Set<MasterHex> getStillToMoveHexes()
-
setMoveCompleted
public void setMoveCompleted(Legion mover, MasterHex current, MasterHex target)
- Specified by:
setMoveCompleted
in interfaceIClientGUI
-
removeBattleChit
public void removeBattleChit(BattleUnit battleUnit)
- Specified by:
removeBattleChit
in interfaceIClientGUI
-
getCallbackHandler
public GUICallbacks getCallbackHandler()
-
answerPickColor
public void answerPickColor(PlayerColor color)
-
leaveCarryMode
public void leaveCarryMode()
- Specified by:
leaveCarryMode
in interfaceGUICallbacks
-
applyCarries
public void applyCarries(BattleHex hex)
- Specified by:
applyCarries
in interfaceGUICallbacks
-
acquireAngelCallback
public void acquireAngelCallback(Legion legion, CreatureType angelType)
- Specified by:
acquireAngelCallback
in interfaceGUICallbacks
-
answerFlee
public void answerFlee(Legion ally, boolean answer)
- Specified by:
answerFlee
in interfaceGUICallbacks
-
answerConcede
public void answerConcede(Legion legion, boolean answer)
- Specified by:
answerConcede
in interfaceGUICallbacks
-
doBattleMove
public void doBattleMove(int tag, BattleHex hex)
- Specified by:
doBattleMove
in interfaceGUICallbacks
-
undoBattleMove
public void undoBattleMove(BattleHex hex)
- Specified by:
undoBattleMove
in interfaceGUICallbacks
-
strike
public void strike(int tag, BattleHex hex)
- Specified by:
strike
in interfaceGUICallbacks
-
doneWithBattleMoves
public void doneWithBattleMoves()
- Specified by:
doneWithBattleMoves
in interfaceGUICallbacks
-
doneWithStrikes
public void doneWithStrikes()
- Specified by:
doneWithStrikes
in interfaceGUICallbacks
-
concede
public void concede()
- Specified by:
concede
in interfaceGUICallbacks
-
-