public Player getOpposingPlayerClosestBall(){
		float cdistance = 100f;
		Player ballHolder = getPlayerWithBall();
		if(ballHolder == null)
			return null;
		float ballX = ballHolder.getDisplay().getRect().getX();
		float ballY = ballHolder.getDisplay().getRect().getY();
		int index = 0;

		if(team1 == getTeamWithBall()){
			for(int i = 0; i < team2.getPlayers().size(); i++){
				float x = team2.getPlayers().get(i).getDisplay().getRect().getX();
				float y = team2.getPlayers().get(i).getDisplay().getRect().getY();
				float d = (float) Math.sqrt(Math.pow((x-ballX), 2) + Math.pow((y-ballY), 2));
				if(cdistance > d){
					cdistance = d;
					index = i;
				}	
			}
			return team2.getPlayers().get(index);
		} else {
			for(int i = 0; i < team1.getPlayers().size(); i++){
				float x = team1.getPlayers().get(i).getDisplay().getRect().getX();
				float y = team1.getPlayers().get(i).getDisplay().getRect().getY();
				float d = (float) Math.sqrt(Math.pow((x-ballX), 2) + Math.pow((y-ballY), 2));
				if(cdistance > d){
					cdistance = d;
					index = i;
				}

			}
			return team1.getPlayers().get(index);
		}

	}