Package it.polimi.ingsw.model.market
Class WhiteMarble
java.lang.Object
it.polimi.ingsw.model.market.MarketMarble
it.polimi.ingsw.model.market.WhiteMarble
public class WhiteMarble extends MarketMarble
Represents a white market marble that can be converted, using a particular type of leader card, in a specific resource
that can be added into warehouse or, in case it's faith, resulting in a step forward on track
-
Constructor Summary
Constructors Constructor Description WhiteMarble() -
Method Summary
Modifier and Type Method Description voidaddResource(InterfacePlayerBoard playerBoard)Adds the resources owed to the player due to this marblevoidaddResource(InterfacePlayerBoard playerBoard, LeaderCard leaderCard)Adds the resources owed to the player due to this marble converted using the specified leaderbooleanequals(java.lang.Object obj)Methods inherited from class it.polimi.ingsw.model.market.MarketMarble
getColorMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
WhiteMarble
public WhiteMarble()
-
-
Method Details
-
addResource
public void addResource(InterfacePlayerBoard playerBoard) throws NotEnoughSpaceException, MoreWhiteLeaderCardsExceptionAdds the resources owed to the player due to this marble- Specified by:
addResourcein classMarketMarble- Parameters:
playerBoard- the player board of the player to whom the resources belong- Throws:
NotEnoughSpaceException- there isn't enough space in the warehouse to add this resourceMoreWhiteLeaderCardsException- the player has more than one leader card that can modify this type of marble and is not specified which must be used.
-
addResource
public void addResource(InterfacePlayerBoard playerBoard, LeaderCard leaderCard) throws NotEnoughSpaceException, WrongLeaderCardExceptionAdds the resources owed to the player due to this marble converted using the specified leader- Overrides:
addResourcein classMarketMarble- Parameters:
playerBoard- the player board of the player to whom the resources belongleaderCard- the leader card that must be used to convert this marble- Throws:
NotEnoughSpaceException- there isn't enough space in the warehouse to add this resourceWrongLeaderCardException- the specified leader card don't convert this marblejava.lang.NullPointerException- the specified leader card is null
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equalsin classjava.lang.Object
-