foul-magics/Mage.Common/src/main/java/mage/view/CounterView.java
Oleg Agafonov eaaa37db11 Card render testing dialog improves:
* Added chooseable render testing (click by mouse on cards);
* Added column style render testing (many cards mode);
* Added tapped, face down and manifested render testing for permanents;
* CardView: fixed missing copy data (NPE for transformed cards);
* CardArea: added support to draw permanents;
* CardArea: added support of offsets between cards/columns;
2020-01-22 00:44:25 +04:00

50 lines
1 KiB
Java

package mage.view;
import mage.counters.Counter;
import java.io.Serializable;
/**
* @author BetaSteward_at_googlemail.com
*/
public class CounterView implements Serializable {
private static final long serialVersionUID = 1L;
private String name;
private int count;
public CounterView(Counter counter) {
this.name = counter.getName();
this.count = counter.getCount();
}
public CounterView(final CounterView view) {
this.name = view.name;
this.count = view.count;
}
public String getName() {
return name;
}
public int getCount() {
return count;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if (other == null) {
return false;
}
if (!(other instanceof CounterView)) {
return false;
}
CounterView oth = (CounterView) other;
return
(count == oth.count) &&
(name.equals(oth.name));
}
}