TP2: Fix the Image compare method.
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 5 Mar 2018 13:06:29 +0000 (14:06 +0100)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 5 Mar 2018 13:06:29 +0000 (14:06 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
TP2/Image.java

index 61dd27014c7c9888cf9418a65a1648fad963623b..007dd577d4547e1355b9ebe767789be91d7e0f0a 100644 (file)
@@ -92,7 +92,7 @@ public class Image extends Forme implements Compactable,
     }
 
     public int compare(Image image1, Image image2) {
     }
 
     public int compare(Image image1, Image image2) {
-        return image1.getSize() - image2.getSize();
+        return image1.getpOri().getY() - image2.getpOri().getY();
     }
 
 }
     }
 
 }