public final void faceto(final int x,final int y){
  final int rndx=x - getX();
  final int rndy=y - getY();
  if (Math.abs(rndx) > Math.abs(rndy)) {
    if (rndx < 0.0) {
      setDirection(Direction.LEFT);
    }
 else {
      setDirection(Direction.RIGHT);
    }
  }
 else {
    if (rndy < 0.0) {
      setDirection(Direction.UP);
    }
 else {
      setDirection(Direction.DOWN);
    }
  }
}

public final void faceto ( final int x , final int y ) { final int rndx = x - getX ( ) ; final int rndy = y - getY ( ) ; if ( Math . abs ( rndx ) > Math . abs ( rndy ) ) { if ( rndx < 0.0 ) { setDirection ( Direction . LEFT ) ; } else { setDirection ( Direction . RIGHT ) ; } } else { if ( rndy < 0.0 ) { setDirection ( Direction . UP ) ; } else { setDirection ( Direction . DOWN ) ; } } }
face toward a specified point on the map .
