Feat/Game Engine #233
@@ -51,11 +51,10 @@ public class Deck {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the current list of cards in the deck. This method returns a new LinkedList
|
* Sets the cards of the deck. This method replaces the internal list
|
||||||
* containing the cards, which allows for safe manipulation of the returned list without
|
* with a copy of the provided list.
|
||||||
* affecting the internal state of the deck.
|
|
||||||
*
|
*
|
||||||
* @return A List of Card objects currently in the deck.
|
* @param cards the new list of cards to set
|
||||||
*/
|
*/
|
||||||
public void setCards(List<Card> cards) {
|
public void setCards(List<Card> cards) {
|
||||||
this.cards = new LinkedList<>(cards);
|
this.cards = new LinkedList<>(cards);
|
||||||
|
|||||||
Reference in New Issue
Block a user