mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 20:11:59 -08:00
change getLibrary().size() > 0 to hasCards()
This commit is contained in:
parent
d6e4ef793e
commit
1caf3a6be4
131 changed files with 186 additions and 220 deletions
|
|
@ -34,6 +34,7 @@ import java.util.LinkedHashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.cards.Card;
|
||||
import mage.counters.Counters;
|
||||
import mage.game.ExileZone;
|
||||
|
|
@ -47,7 +48,6 @@ import mage.players.Player;
|
|||
import mage.players.net.UserData;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class PlayerView implements Serializable {
|
||||
|
|
@ -125,7 +125,7 @@ public class PlayerView implements Serializable {
|
|||
} catch (ConcurrentModificationException e) {
|
||||
// can happen as a player left battlefield while PlayerView is created
|
||||
}
|
||||
Card cardOnTop = (player.isTopCardRevealed() && player.getLibrary().size() > 0)
|
||||
Card cardOnTop = (player.isTopCardRevealed() && player.getLibrary().hasCards())
|
||||
? player.getLibrary().getFromTop(game) : null;
|
||||
this.topCard = cardOnTop != null ? new CardView(cardOnTop) : null;
|
||||
if (player.getUserData() != null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue