public void defendGoal(ObjBall ball) throws UnknownHostException, InterruptedException {
		//Pos ridBallPoint = new Pos(0,0);
		
		//Move to catchable range of ball
		if (ball.getDistance() > 1.0) {
			getAction().gotoPoint(mh.getNextBallPoint(ball));
			//Thread.sleep(100);
		}
		else {
			if((getMem().side.compareTo("l") == 0) && ((getMem().playMode.compareTo("goalie catch ball_l") == 0) || (getMem().playMode.compareTo("free_kick_l") == 0))) {
				Thread.sleep(500);
				turn(-getMem().getDirection());
				Thread.sleep(200);
				kick(100, 0);
				Thread.sleep(100);	
			}
			else if((getMem().side.compareTo("r") == 0) && ((getMem().playMode.compareTo("goalie catch ball_r") == 0) || (getMem().playMode.compareTo("free_kick_r") == 0))) {
				Thread.sleep(500);
				turn(-getMem().getDirection());
				Thread.sleep(200);
				kick(100, 0);
				Thread.sleep(100);
			}
			else {
				catchball(getMem().getBall().getDirection());
				
				
			}
			
			
			/*
			//If ball is in catchable area, catch it
			System.out.println("catchable");
			if (!ballCaught) {
				catchball(getMem().getBall().getDirection());
				Thread.sleep(100);
				ballCaught = true;	
			}
			
			//kickToPlayer(closestPlayer());
			getAction().kickToPoint(ball, ridBallPoint);
			Thread.sleep(100);	
			*/
		}
	} //end method