added getColorCount

This commit is contained in:
BetaSteward 2010-04-11 19:24:49 +00:00
parent 6ae4e31bb0
commit bdc88f8669

View file

@ -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());