We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draws cards from a deck
Contains target and amount.
If target.target == null, assume you draw card from your deck.
Else, calling owner.getTargetPlayer(targetboard) will return the player to get the deck from.
amount.evaluateAsExpression(targetBoard, owner) will give the number of cards to draw.
The text was updated successfully, but these errors were encountered:
Implement as follow:
public boolean use(GameBoard targetBoard, Player owner) { int cardAmount = amount.evaluateAsExpression(targetBoard, owner); Player player; if (target.target == null) { player = owner; } else { player = targetBoard.getOtherPlayer(owner); } for (int i = 0; i < cardAmount; i++) { player.drawOneCard(); } return true; }
Sorry, something went wrong.
No branches or pull requests
Draws cards from a deck
Contains target and amount.
If target.target == null, assume you draw card from your deck.
Else, calling owner.getTargetPlayer(targetboard) will return the player to get the deck from.
amount.evaluateAsExpression(targetBoard, owner) will give the number of cards to draw.
The text was updated successfully, but these errors were encountered: