merge the new developmentbranch into the test branch #39
@@ -90,6 +90,20 @@ private void initializeDrawPile() {
|
|||||||
addBonusCards(BonusCard.TURBO, AMOUNT_OF_TURBO_CARDS);
|
addBonusCards(BonusCard.TURBO, AMOUNT_OF_TURBO_CARDS);
|
||||||
addBonusCards(BonusCard.SWAP, AMOUNT_OF_SWAP_CARDS);
|
addBonusCards(BonusCard.SWAP, AMOUNT_OF_SWAP_CARDS);
|
||||||
addBonusCards(BonusCard.SHIELD, AMOUNT_OF_SHIELD_CARDS);
|
addBonusCards(BonusCard.SHIELD, AMOUNT_OF_SHIELD_CARDS);
|
||||||
|
Collections.shuffle(this.drawPile);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method will be used to remove the first card of the drawPile attribute of Game class.
|
||||||
|
*
|
||||||
|
* @return first card as a BonusCard enumeration.
|
||||||
|
*/
|
||||||
|
public BonusCard draw() {
|
||||||
|
if (!this.drawPile.isEmpty()) {
|
||||||
|
return this.drawPile.remove(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user