Start the implementation of inputs gathering and the comparator code (still buggy...
[Persons_Comparator.git] / src / Eye.java
index 59612440812c342dd6dd929b91936de79363d337..edaea1bb467c07f00a510e155804a25c7b952114 100644 (file)
@@ -47,10 +47,14 @@ public class Eye implements Comparable<Eye> {
      */
     public void setColor(String color) {
         if (validateColor(color)) {
-            if (color.equals("brown"))
+            if (color.equals("black"))
+                this.color = Color.black;
+            else if (color.equals("blue"))
+                this.color = Color.blue;
+            else if (color.equals("brown"))
                 this.color = new Color(88, 41, 0);
-            else
-                this.color = Color.getColor(color);
+            else if (color.equals("green"))
+                this.color = Color.green;
         } else {
             throw new IllegalArgumentException("Color must be" + this.colorListToString());
         }