mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
added getColorCount
This commit is contained in:
parent
6ae4e31bb0
commit
bdc88f8669
1 changed files with 10 additions and 0 deletions
|
|
@ -65,6 +65,16 @@ public class ObjectColor implements Serializable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getColorCount() {
|
||||||
|
int count = 0;
|
||||||
|
if (white) count++;
|
||||||
|
if (blue) count++;
|
||||||
|
if (black) count++;
|
||||||
|
if (green) count++;
|
||||||
|
if (red) count++;
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
public void setColor(ObjectColor color) {
|
public void setColor(ObjectColor color) {
|
||||||
this.setBlack(color.isBlack());
|
this.setBlack(color.isBlack());
|
||||||
this.setBlue(color.isBlue());
|
this.setBlue(color.isBlue());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue