@Override
	/**
	 * Detects location of click, activates selected piece.
	 */
	public void mousePressed(MouseEvent e) {
		if (gui.getCurrentGame() == null) {
			return;
		}
		GameBlock[][] blocks = gui.getCurrentGame().getGameBoard().getBoard();
		GameBlock block = null;
		for (int y = 0; y < gui.getCurrentGame().getGameBoard().getSizeY(); y++) {
			for (int x = 0; x < gui.getCurrentGame().getGameBoard().getSizeX(); x++) {
				block = blocks[x][y];
				int xPos = block.getBoardPosX();
				int yPos = block.getBoardPosY();
				if ((e.getX() > xPos)
						&& (e.getX() < xPos + block.getNewSize().width)
						&& (e.getY() > yPos)
						&& (e.getY() < yPos + block.getNewSize().height)
						&& ((gui.getCurrentGame().getPlayerTurn() == block
								.getOccupant().getValue()) || block
								.getOccupant() == BlockOccupant.EMPTY)) {
					gui.getCurrentGame().setActive(block);
				}
			}
		}
		gui.repaint();
	}