Class Charon
java.lang.Object
it.polimi.ingsw.server.controller.god.God
it.polimi.ingsw.server.controller.god.Charon
public class Charon extends God
Represents the card of the God Charon.
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 Charon(GodController godController) -
Method Summary
Modifier and Type Method Description voidevolveTurn(Worker worker)The evolution of the turn for the player that holds the Charon God card is different from the abstract implementation.java.lang.StringgetDescription()GodControllergetGodController()voidmove(Worker worker)Default rules to move the worker during a turn of the game.Methods inherited from class it.polimi.ingsw.server.controller.god.God
build, toString, updateBuildMap, updateMoveMap, win
-
Field Details
-
description
public final java.lang.String description- See Also:
- Constant Field Values
-
-
Constructor Details
-
Method Details
-
evolveTurn
public void evolveTurn(Worker worker) throws UnableToMoveException, UnableToBuildException, WinExceptionThe evolution of the turn for the player that holds the Charon God card is different from the abstract implementation. Here we can force to move an enemy to another position at the beginning of the turn.- Overrides:
evolveTurnin classGod- Parameters:
worker- Selected worker that will act in the current turn.- Throws:
UnableToMoveException- The worker isn't allowed to move anywhere.UnableToBuildException- The worker isn't allowed to build anywhere.WinException- The worker has reached the third level of a building and so wins the game.
-
move
Default rules to move the worker during a turn of the game.- Overrides:
movein classGod- Parameters:
worker- Selected worker that will move.- Throws:
UnableToMoveException- The worker isn't allowed to move anywhere.
-
getGodController
- Overrides:
getGodControllerin classGod
-
getDescription
public java.lang.String getDescription()- Specified by:
getDescriptionin classGod
-