
/**
 * Write a description of class Comparador here.
 *
 * @author (your name)
 * @version (a version number or a date)
 */
public class Comparador <T extends Posicion> {
    private T c1;
    private T c2;
    
    public Comparador(T o1, T o2) {
        c1 = o1;
        c2 = o2;
    }

    public boolean compararPosiciones() {
        return c1.obtenerCoordenadaX() == c2.obtenerCoordenadaX() && 
        c1.obtenerCoordenadaY() == c2.obtenerCoordenadaY();
    }
}
