Class PlayMat
java.lang.Object
com.cmiurca.saintseiyadeckbuilding.saintseiya.PlayMat
PlayMat class, where the playmat is created
- Since:
- 2023-02-04
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCardToCardReserve
(Card card) Method to add a card to the card reservevoid
addCardToCommonDiscard
(Card card) Method to add a card to the common discardvoid
addCardToLocation
(Card card, int location) Method to add a card to the card locationvoid
addFlameOfTheClock
(int amount) Method to add flame of the clockgetCardInLocationFromIndex
(int index) Getter for card in cardLocation at indexCard[]
Getter for cardLocationGetter for cardReserveGetter for commonDiscardGetter for currentGameint
Getter for flameOfTheClockRemainingGetter for onGoingEffectboolean
isCardLocationEmpty
(int location) Method to check if the card location is emptyboolean
isCardLocationFull
(int location) Method to check if the card location is fullboolean
Method to check if the card reserve is emptyboolean
Method to check if the card reserve is fullboolean
Method to check if the common discard is emptyboolean
Method to check if the common discard is fullvoid
Method to remove a card from the card reservevoid
removeCardFromCommonDiscard
(int id) Method to remove a card from common discardvoid
Method to remove a card from the common discardvoid
removeCardFromLocation
(int location) Method to remove a card from the card locationvoid
removeCardFromLocationFromIndex
(int index) Method to remove a card from cardLocation by indexvoid
removeFlameOfTheClock
(int amount, Game currentGame) Method to remove flame of the clockvoid
setCardLocation
(Card[] cardLocation) Setter for cardLocationvoid
setCardReserve
(ArrayList<Card> cardReserve) Setter for cardReservevoid
setCommonDiscard
(ArrayList<Card> commonDiscard) Setter for commonDiscardvoid
setCurrentGame
(Game currentGame) Setter for currentGamevoid
setFlameOfTheClockRemaining
(int flameOfTheClockRemaining) Setter for flameOfTheClockRemainingvoid
setOnGoingEffect
(Effect onGoingEffect) Setter for onGoingEffecttoString()
To string method
-
Constructor Details
-
PlayMat
public PlayMat(Card[] cardLocation, ArrayList<Card> commonDiscard, ArrayList<Card> cardReserve, Effect onGoingEffect, int flameOfTheClockRemaining, Game currentGame) Constructor for PlayMat class- Parameters:
cardLocation
- card location of the playmatcommonDiscard
- common discard of the playmatcardReserve
- card reserve of the playmatonGoingEffect
- on going effect of the playmatflameOfTheClockRemaining
- number of flameOfTheClock RemainingcurrentGame
- current game
-
PlayMat
Constructor for PlayMat class- Parameters:
currentGame
- current game
-
-
Method Details
-
getCardLocation
Getter for cardLocation- Returns:
- Card[] cardLocation
-
getCardInLocationFromIndex
Getter for card in cardLocation at index- Parameters:
index
- index of the card in cardLocation- Returns:
- Card in cardLocation
-
removeCardFromLocationFromIndex
public void removeCardFromLocationFromIndex(int index) Method to remove a card from cardLocation by index- Parameters:
index
- index of the card in cardLocation
-
setCardLocation
Setter for cardLocation- Parameters:
cardLocation
- card location of the playmat
-
getCommonDiscard
Getter for commonDiscard- Returns:
- Card[] commonDiscard
-
setCommonDiscard
Setter for commonDiscard- Parameters:
commonDiscard
- common discard of the playmat
-
getCardReserve
Getter for cardReserve- Returns:
- Card[] cardReserve
-
setCardReserve
Setter for cardReserve- Parameters:
cardReserve
- card reserve of the playmat
-
getOnGoingEffect
Getter for onGoingEffect- Returns:
- Effect onGoingEffect
-
setOnGoingEffect
Setter for onGoingEffect- Parameters:
onGoingEffect
- on going effect of the playmat
-
getFlameOfTheClockRemaining
public int getFlameOfTheClockRemaining()Getter for flameOfTheClockRemaining- Returns:
- int flameOfTheClockRemaining
-
setFlameOfTheClockRemaining
public void setFlameOfTheClockRemaining(int flameOfTheClockRemaining) Setter for flameOfTheClockRemaining- Parameters:
flameOfTheClockRemaining
- number of flameOfTheClock Remaining
-
getCurrentGame
Getter for currentGame- Returns:
- Game currentGame
-
setCurrentGame
Setter for currentGame- Parameters:
currentGame
- current game
-
addCardToLocation
Method to add a card to the card location- Parameters:
card
- card to be addedlocation
- location of the card
-
addCardToCommonDiscard
Method to add a card to the common discard- Parameters:
card
- card to be added
-
addCardToCardReserve
Method to add a card to the card reserve- Parameters:
card
- card to be added
-
removeCardFromLocation
public void removeCardFromLocation(int location) Method to remove a card from the card location- Parameters:
location
- location of the card
-
removeCardFromCommonDiscard
Method to remove a card from the common discard- Parameters:
card
- card to be removed
-
removeCardFromCommonDiscard
public void removeCardFromCommonDiscard(int id) Method to remove a card from common discard- Parameters:
id
- of the card to be removed from the common discard
-
removeCardFromCardReserve
Method to remove a card from the card reserve- Parameters:
card
- card to be removed
-
removeFlameOfTheClock
Method to remove flame of the clock- Parameters:
amount
- of flame of the clock to be removedcurrentGame
- current game
-
addFlameOfTheClock
public void addFlameOfTheClock(int amount) Method to add flame of the clock- Parameters:
amount
- amount of flame of the clock to be added
-
isCardLocationEmpty
public boolean isCardLocationEmpty(int location) Method to check if the card location is empty- Parameters:
location
- location of the card- Returns:
- boolean true if the card location is empty
-
isCommonDiscardEmpty
public boolean isCommonDiscardEmpty()Method to check if the common discard is empty- Returns:
- boolean true if the common discard is empty
-
isCardReserveEmpty
public boolean isCardReserveEmpty()Method to check if the card reserve is empty- Returns:
- boolean true if the card reserve is empty
-
isCardLocationFull
public boolean isCardLocationFull(int location) Method to check if the card location is full- Parameters:
location
- location of the card- Returns:
- boolean true if the card location is full
-
isCommonDiscardFull
public boolean isCommonDiscardFull()Method to check if the common discard is full- Returns:
- boolean true if the common discard is full
-
isCardReserveFull
public boolean isCardReserveFull()Method to check if the card reserve is full- Returns:
- boolean true if the card reserve is full
-
toString
To string method
-