mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 12:02:01 -08:00
...
This commit is contained in:
parent
460ee77e4e
commit
e0b4388361
555 changed files with 20323 additions and 1942 deletions
|
|
@ -29,8 +29,9 @@
|
|||
package mage;
|
||||
|
||||
import java.io.Serializable;
|
||||
import mage.util.Copyable;
|
||||
|
||||
public class ObjectColor implements Serializable {
|
||||
public class ObjectColor implements Serializable, Copyable<ObjectColor> {
|
||||
|
||||
public static final ObjectColor WHITE = new ObjectColor("W");
|
||||
public static final ObjectColor BLUE = new ObjectColor("U");
|
||||
|
|
@ -63,6 +64,14 @@ public class ObjectColor implements Serializable {
|
|||
}
|
||||
}
|
||||
|
||||
public ObjectColor(ObjectColor color) {
|
||||
white = color.white;
|
||||
blue = color.blue;
|
||||
black = color.black;
|
||||
red = color.red;
|
||||
green = color.green;
|
||||
}
|
||||
|
||||
public int getColorCount() {
|
||||
int count = 0;
|
||||
if (white) count++;
|
||||
|
|
@ -196,5 +205,10 @@ public class ObjectColor implements Serializable {
|
|||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ObjectColor copy() {
|
||||
return new ObjectColor(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue