@Override
	public void render(Graphics g, int displayWidth, int displayHeight) {
		g.setColor(Color.gray);

		// render pitch
		BufferedImage pitch = ImageManager.getImage("pitch");
		BufferedImage goal = ImageManager.getImage("goal");
		g.fillRect(offset-5, offset-5, pitch.getWidth() + 10, pitch.getHeight() + 10);
		g.drawImage(pitch, offset, offset, pitch.getWidth(), pitch.getHeight(), null);

		if(Configuration.DEBUGGING){ // pitch hitbox
			g.drawRect(20+offset, 50+offset, 472, 500);
		}
		// render goal
		g.drawImage(goal, offset, offset, goal.getWidth(), goal.getHeight(), null);
		if(Configuration.DEBUGGING){ // goal hitbox
			g.drawRect(196+offset, 10+offset, 118, 45);
		}

		// render players
		for (Player p : cpuTeam) {
			p.render(g, displayWidth, displayHeight, offset);

		}

		for (Player p : playerTeam) {
			p.render(g, displayWidth, displayHeight, offset);
		}

		keeper.render(g, displayWidth, displayHeight, offset);

		// render ball
		ball.render(g, displayWidth, displayHeight, offset);


		// render instruction buttons
		buttons[0].render(g, displayWidth, displayHeight);
		if(selectedPlayer != null){
			for(int i = 1; i < buttons.length; i++){
				buttons[i].render(g, displayWidth, displayHeight);
			}
		}

		// render scoreboard
		g.setColor(Color.gray);
		g.fillRect(577, 25, 261, 50);
		g.fillRect(863, 25, 138, 50);

		g.setFont(ImageManager.getFont(44f));
		g.setColor(Color.blue);
		g.drawString(Configuration.PLAYER_ABBREVIATION, 580, 64);
		g.setColor(Color.white);
		String scores = (playerScored ? score + 1 : score) + ":" + score;
		g.drawString(scores, 670, 64);
		g.setColor(Color.red);
		g.drawString(Configuration.CPU_ABBREVIATION, 750, 64);

		g.setColor(Color.white);
		if(secondsElapsed < 0){
			g.drawString("FT", 905, 64);
		} else {
			g.drawString("92:" + (50 + secondsElapsed), 870, 64);
		}

		// render commentary
		g.setFont(ImageManager.getFont(16f));
		g.setColor(Color.gray);
		g.fillRect(577, 525, 422, 50);
		g.setColor(Color.white);
		String[] commentaryLines = commentary.split("%n%");
		for (int i = 0; i < commentaryLines.length; i++) {
			String c = commentaryLines[i];
			g.drawString(c, 582, 540 + i*20 + 5);
		}

		g.setFont(ImageManager.getFont(8f));
	}