public void init(){
		
		generator = new Random();

		playerList = new ArrayList<Entity>();
		
		chargeTime = new double[10];
		chargeCanceled = new boolean[10];
		pushDelay = new double[10];
		
		/*build trigonometry tables*/
		double toRadian = Math.PI/(180*trigScale);
		//sine
		sin = new float[(90*trigScale) + 1];
		for(int i=0;i<sin.length;i++){
			sin[i] = ((float)Math.sin(((double)i) * toRadian));
		}

		//cosine
		cos = new float[(90*trigScale) + 1];
		for(int i=0;i<cos.length;i++){
			cos[i] = ((float)Math.cos(((double)i) * toRadian));
		}

		//tangent
		tan = new float[(90*trigScale) + 1];
		for(int i=0;i<tan.length;i++){
			tan[i] = sin[i]/cos[i];
		}

		corner = new Polygon[4];
		//ordered counter-clockwise, starting from top-right
		int[][] cornerPointsX = {{7000,7000,6200},{-200,-1000,-1000},{-1000,-1000,-200},{6200,7000,7000}};
		int[][] cornerPointsY = {{4920,5720,5720},{5720,5720,4920},{1080,280,280},{280,280,1080}};
			
		for(int i=0;i<4;i++){
			corner[i] = new Polygon();
			corner[i].npoints = 3;
			corner[i].xpoints = cornerPointsX[i];
			corner[i].ypoints = cornerPointsY[i];
		}

		final int BOUNDARY_SIZE = Entity.PLAYER_SIZE + 50;
		
		int pushCosOffset = (int) (BOUNDARY_SIZE*cos[67]);
		int pushSinOffset = (int) (BOUNDARY_SIZE*sin[67]);
	
		int[] pointsX = {cornerPointsX[0][0]-pushSinOffset,cornerPointsX[0][2]-pushCosOffset,cornerPointsX[1][0]+pushCosOffset,cornerPointsX[1][2]+pushSinOffset,cornerPointsX[2][0]+pushSinOffset,cornerPointsX[2][2]+pushCosOffset,cornerPointsX[3][0]-pushCosOffset,cornerPointsX[3][2]-pushSinOffset};
		int[] pointsY = {cornerPointsY[0][0]-pushCosOffset,cornerPointsY[0][2]-pushSinOffset,cornerPointsY[1][0]-pushSinOffset,cornerPointsY[1][2]-pushCosOffset,cornerPointsY[2][0]+pushCosOffset,cornerPointsY[2][2]+pushSinOffset,cornerPointsY[3][0]+pushSinOffset,cornerPointsY[3][2]+pushCosOffset};
		pushOffBoundary = new Polygon();
		pushOffBoundary.npoints=pointsX.length;
		pushOffBoundary.xpoints=pointsX;
		pushOffBoundary.ypoints=pointsY;
		

		//player init
		for(int i=0; i<10; i++){
			Entity player = new Entity();

			//team specific init
			if(i<5){
				player.x = playerStartX[i];
				player.y = playerStartY[i];
			} else {
				player.x = 6000 - playerStartX[i - 5];
				player.y = playerStartY[i - 5];
			}

			//general init
			playerList.add(player);
			player.playerInit();
		}
		
		//ball init
		ball = new Entity();
		ball.x = 3000;
		ball.y = 3010;
		ball.ballInit();
		
		//goalie init

		blueGoalie = new Goalie(true/*isBlue*/, new Point(-1440, 3010));
		redGoalie = new Goalie(false, new Point(7420, 3010));
		
		GameState.state=GameState.GAME_RUN;
		GameState.period=1;
		GameState.periodLength=600;
		GameState.numOfPeriods=3;
		GameState.randomPlayerPositions = true;		
		
		GameState.time=GameState.periodLength;//CRITICAL. SETS TIME TO PERIOD LENGTH BEFORE STARTING GAME		
	}//end initialization