@Override
	public void actionPerformed(ActionEvent event) {
		//Handle button presses.
		if (match.isInProgress()) { //Don't do anything if the game is over.
			String actionCommand = event.getActionCommand();
			if (actionCommand == GameInfoPanel.END_TURN_BUTTON_TEXT) { //Handle turn ending.
				match.endTurn();
			} else if (actionCommand == GameInfoPanel.SURRENDER_BUTTON_TEXT) { //Handle surrendering.
				match.getPanel().getMatchInfoPanel().setSurrenderPending(true); //"Are you sure?"
			} else if (actionCommand == GameInfoPanel.SURRENDER_BUTTON_CONFIRM_TEXT) {
				match.surrender();
			} else if (actionCommand == AbilityPanel.ABILITY_BUTTON_COMMAND) { //Handle ability activation.
				JButton abilityButton = (JButton) event.getSource();
				match.handleAbilityButtonClick(Ability.valueOf(abilityButton.getText()));
				match.getPanel().getMatchInfoPanel().setSurrenderPending(false);
				//TODO: Maybe improve this structure.
			}
		}
	}