forked from External/mage
add isOwned and isControlled methods. remove some null-checks, remove some unnecessary casts
This commit is contained in:
parent
e46ad02918
commit
9f06046f22
464 changed files with 567 additions and 562 deletions
|
|
@ -101,7 +101,7 @@ public class Library implements Serializable {
|
|||
}
|
||||
|
||||
public void putOnTop(Card card, Game game) {
|
||||
if (card.getOwnerId().equals(playerId)) {
|
||||
if (card.isOwnedBy(playerId)) {
|
||||
card.setZone(Zone.LIBRARY, game);
|
||||
library.addFirst(card.getId());
|
||||
} else {
|
||||
|
|
@ -125,7 +125,7 @@ public class Library implements Serializable {
|
|||
}
|
||||
|
||||
public void putOnBottom(Card card, Game game) {
|
||||
if (card.getOwnerId().equals(playerId)) {
|
||||
if (card.isOwnedBy(playerId)) {
|
||||
card.setZone(Zone.LIBRARY, game);
|
||||
library.remove(card.getId());
|
||||
library.add(card.getId());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue