added a wrapper function: public void drawCards(player, numCards);

This commit is contained in:
jendave
2011-08-06 04:08:44 +00:00
parent 4bf84cbfbf
commit 7bc9ff8f07

View File

@@ -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);