public void scoreGoal(Player p){
		//might need to add stuff to Player.scoreGoal() so that this works correctly
		if(p == null)
			return;
		float x = p.getXLeft();
		float y = p.getYTop();


		if(getTeamWithBall() == team1){
			float x2 = team2.getPlayers().get(0).getXLeft();
			float y2 = team2.getPlayers().get(0).getYTop();
			float distance = (float)Math.sqrt(Math.pow((x-x2), 2) + Math.pow((y-y2), 2));
			if(distance < 0.7){
				int n = new Random().nextInt(10);
				if(n < 7){
					getPlayerWithBall().scoreGoal();
					team1Scored();
				}
			}
		}

		if(getTeamWithBall() == team2){
			float x2 = team1.getPlayers().get(0).getXLeft();
			float y2 = team1.getPlayers().get(0).getYTop();
			float distance = (float)Math.sqrt(Math.pow((x-x2), 2) + Math.pow((y-y2), 2));
			if(distance < 0.7){
				int n = new Random().nextInt(10);
				if( n < 7){
					getPlayerWithBall().scoreGoal();
					team2Scored();
				}
			}
		}
	}