public void goalKick( ArrayList<Player> players, Player p){

		if (((Player)p).isGoalie()){
			try{
				p.setBall(ball);
				int num = GameEngine.rgen.nextInt(11);

				if(players.get(num) != p){
					p.pass(players.get(num));
				} else {
					if(num < 10){
						num ++;
					} else {
						num--;
					}
					p.pass(players.get(num));
				}
			}catch(NullPointerException e){

				p.testSetBall(true);
				Random rand = new Random();
				int num = rand.nextInt(11);
				if(players.get(num) != p){
					p.testPass(players.get(num));
				} else {
					if(num < 10){
						num ++;
					} else {
						num--;
					}
					p.testPass(players.get(num));
				}
			}
		}
	}