
/**
 * Write a description of class Comprador here.
 *
 * @author (your name)
 * @version (a version number or a date)
 */
public class Comparador<T> {
    // instance variables - replace the example below with your own
   
    private Object o;
    private Object o1;
    
    public Comparador(Object o, Object o1) {
        this.o = o;
        this.o1 = o1;
      
    }
    public boolean compararPosiciones(){
        if(this.o instanceof Posicion && this.o1 instanceof Posicion){
            
            Posicion p = (Posicion) o;
            Posicion p1 = (Posicion) o1;
            if(p.obtenerCoordenadaX() == p1.obtenerCoordenadaX() && p.obtenerCoordenadaY() == p1.obtenerCoordenadaY()) 
       
            return true;
            
        }
        return false;
    }
    
}
