java.lang.Object
it.polimi.ingsw.model.God
public class God
extends java.lang.Object
Representation of a god card and its effect
-
Constructor Summary
Constructors Constructor Description God(java.lang.String name, int workersNumber, java.lang.String descriptionStrategy)
Default constructor -
Method Summary
Modifier and Type Method Description GodData
buildDataClass()
Creates a GodData object based on this godGod
cloneGod(Game game)
Creates a clone of this godjava.lang.String
getDescriptionStrategy()
description getterjava.lang.String
getName()
name getterRuleSetStrategy
getStrategy()
strategy getterint
getWorkersNumber()
workersNumber gettervoid
setStrategy(RuleSetStrategy strategy)
strategy setter
-
Constructor Details
-
God
public God(java.lang.String name, int workersNumber, java.lang.String descriptionStrategy)Default constructor- Parameters:
name
- the god's nameworkersNumber
- the number of workers associated to a given goddescriptionStrategy
- a description of the god's power
-
-
Method Details
-
cloneGod
Creates a clone of this god- Parameters:
game
- the current game- Returns:
- a clone of this object
-
getName
public java.lang.String getName()name getter- Returns:
- the god's name
-
getDescriptionStrategy
public java.lang.String getDescriptionStrategy()description getter- Returns:
- the god power description
-
getWorkersNumber
public int getWorkersNumber()workersNumber getter- Returns:
- the number of workers associated with the god power
-
getStrategy
strategy getter- Returns:
- the strategy associated with the god effects
-
setStrategy
strategy setter- Parameters:
strategy
- the strategy associated with thr god effects
-
buildDataClass
Creates a GodData object based on this god- Returns:
- this object's data class
-