mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
Added message about revealed cards to game log.
This commit is contained in:
parent
9b5bb52f10
commit
778a3ce688
1 changed files with 10 additions and 0 deletions
|
@ -1012,6 +1012,16 @@ public abstract class PlayerImpl<T extends PlayerImpl<T>> implements Player, Ser
|
|||
@Override
|
||||
public void revealCards(String name, Cards cards, Game game) {
|
||||
game.getState().getRevealed().add(name, cards);
|
||||
StringBuilder sb = new StringBuilder(this.getName()).append(" reveals ");
|
||||
int current = 0, last = cards.size();
|
||||
for (Card card :cards.getCards(game)) {
|
||||
current++;
|
||||
sb.append(card.getName());
|
||||
if (current < last) {
|
||||
sb.append(", ");
|
||||
}
|
||||
}
|
||||
game.informPlayers(sb.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue