Class EndTurnAction
java.lang.Object
net.demilich.metastone.game.actions.GameAction
net.demilich.metastone.game.actions.EndTurnAction
- All Implemented Interfaces:
Serializable
,Cloneable
,Notification
This action ends the player's current turn.
Sometimes, the action is not available. This is typically due to a pending DiscoverAction
or OpenerAction
.
- See Also:
-
Field Summary
Fields inherited from class net.demilich.metastone.game.actions.GameAction
chooseOneOptionIndex
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
void
execute
(GameContext context, int playerId) The implementation of this method actually represents the game effects of this action.getDescription
(GameContext context, int playerId) A user-renderable description of what occurred in this notification.getSource
(GameContext context) getTargets
(GameContext context, int player) For visualization purposes, what are the targets of this notification?Methods inherited from class net.demilich.metastone.game.actions.GameAction
canBeExecutedOn, equals, getActionType, getChooseOneOptionIndex, getId, getSource, getSourceReference, getTargetReference, getTargetRequirement, hashCode, isClientInterested, isOverrideChild, isPowerHistory, setActionType, setChooseOneOptionIndex, setId, setOverrideChild, setSourceReference, setTarget, setTargetReference, setTargetRequirement, toString, withTargetReference
-
Constructor Details
-
EndTurnAction
public EndTurnAction(int playerId)
-
-
Method Details
-
clone
- Overrides:
clone
in classGameAction
-
execute
Description copied from class:GameAction
The implementation of this method actually represents the game effects of this action.For example, the
PlayMinionCardAction
eventually callsGameLogic.summon(int, Minion, Entity, int, boolean)
.- Specified by:
execute
in classGameAction
- Parameters:
context
- The game contextplayerId
- The invoking player- See Also:
-
getSource
- Specified by:
getSource
in interfaceNotification
- Overrides:
getSource
in classGameAction
-
getTargets
Description copied from interface:Notification
For visualization purposes, what are the targets of this notification?- Specified by:
getTargets
in interfaceNotification
- Overrides:
getTargets
in classGameAction
- Parameters:
context
- game contextplayer
- the player- Returns:
- A reference to the entity that is the visualizable target of this notification.
-
getDescription
Description copied from interface:Notification
A user-renderable description of what occurred in this notification.- Specified by:
getDescription
in interfaceNotification
- Overrides:
getDescription
in classGameAction
- Parameters:
context
- the game contextplayerId
- the player ID- Returns:
- a description string
-