mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
added a wrapper function: public void drawCards(player, numCards);
This commit is contained in:
@@ -781,6 +781,20 @@ public class GameAction {
|
|||||||
lastPlayerToDraw = s;
|
lastPlayerToDraw = s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* target player draws a certain number of cards
|
||||||
|
*
|
||||||
|
* @param player target player to draw
|
||||||
|
* @param numCards the number of cards the player should draw
|
||||||
|
*/
|
||||||
|
public void drawCards(String player, int numCards) {
|
||||||
|
if(numCards > 0) {
|
||||||
|
for(int i=0; i < numCards; i++) {
|
||||||
|
drawCard(player);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void drawCard(String player) {
|
public void drawCard(String player) {
|
||||||
|
|
||||||
boolean isDrawPhase = AllZone.Phase.getPhase().equals(Constant.Phase.Draw);
|
boolean isDrawPhase = AllZone.Phase.getPhase().equals(Constant.Phase.Draw);
|
||||||
|
|||||||
Reference in New Issue
Block a user