mirror of
https://github.com/correl/mage.git
synced 2024-11-21 19:18:40 +00: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) {
|
||||
this.setBlack(color.isBlack());
|
||||
this.setBlue(color.isBlue());
|
||||
|
|
Loading…
Reference in a new issue