Class Apollo
java.lang.Object
it.polimi.ingsw.server.controller.god.God
it.polimi.ingsw.server.controller.god.Apollo
public class Apollo extends God
Represents the card of the God Apollo.
Allows to follow the instructions and to apply the effect of this specific God.
-
Field Summary
Fields Modifier and Type Field Description java.lang.Stringdescription -
Constructor Summary
Constructors Constructor Description Apollo(GodController godController) -
Method Summary
Modifier and Type Method Description java.lang.StringgetDescription()GodControllergetGodController()voidmove(Worker worker)The difference from the super class method is that here the worker can also move into another enemy worker's position, swapping the position of the two workers.WorkerMoveMapupdateMoveMap(Worker worker)Updates the worker's MoveMap, taking into account that Apollo can also move into an enemy neighbor position.Methods inherited from class it.polimi.ingsw.server.controller.god.God
build, evolveTurn, toString, updateBuildMap, win
-
Field Details
-
description
public final java.lang.String description- See Also:
- Constant Field Values
-
-
Constructor Details
-
Method Details
-
move
The difference from the super class method is that here the worker can also move into another enemy worker's position, swapping the position of the two workers.- Overrides:
movein classGod- Parameters:
worker- Selected worker that will move.- Throws:
UnableToMoveException- If the worker cannot move anywhere.
-
updateMoveMap
Updates the worker's MoveMap, taking into account that Apollo can also move into an enemy neighbor position.- Overrides:
updateMoveMapin classGod- Parameters:
worker- worker playing the turn.- Returns:
- The MoveMap of the selected worker.
- Throws:
UnableToMoveException- If the worker cannot win anywhere.
-
getGodController
- Overrides:
getGodControllerin classGod
-
getDescription
public java.lang.String getDescription()- Specified by:
getDescriptionin classGod
-