Package dev.davwheat
Class Card
- java.lang.Object
-
- dev.davwheat.Card
-
public class Card extends java.lang.ObjectRepresents a Card in the Deck. Contains info about the card (message, balance change as a result), and methods to take the action.
-
-
Field Summary
Fields Modifier and Type Field Description doublebalanceChangejava.lang.StringmessagebooleanmissNextTurn
-
Constructor Summary
Constructors Constructor Description Card(java.lang.String cardMessage, double balanceChange, boolean missNextTurn)Creates a new Card.
-
Method Summary
Modifier and Type Method Description voidprintCard()voidtakeAction(Player actor)Takes the action on the card against a specified player and prints info about that action.
-
-
-
Method Detail
-
takeAction
public void takeAction(Player actor) throws InsufficientBalanceException
Takes the action on the card against a specified player and prints info about that action.Will adjust their bank balance as required, and make them miss the next turn if needed.
- Parameters:
actor- Player to perform actions upon- Throws:
InsufficientBalanceException
-
printCard
public void printCard()
-
-