public void move(int width, int height){


    	if(getX()>=(width-20)){
    		wallHit(1);
    	}
    	if(getX()<=0){
    		wallHit(1);
    	}
    	if(getY()<=0){
    		wallHit(2);
    	}
    	if(getY()>=(height-20)){
    		wallHit(2);
    	}


    	x = x + velocity*directionX;
    	y = y + velocity*directionY;
    }